PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/FsxUnit/FsxUnit.Test/LessThanTests.fs

http://github.com/rodrigovidal/FsxUnit
F# | 60 lines | 43 code | 15 blank | 2 comment | 0 complexity | bc04593a23e01973e63fc62893482386 MD5 | raw file
  1. namespace FsxUnit.Test
  2. open NUnit.Framework
  3. open FsxUnit
  4. [<TestFixture>]
  5. type ``Less Than tests`` ()=
  6. // Collection
  7. [<Test>] member test.
  8. ``Number 0 should be less than 1`` ()=
  9. 0 |> should be (lessThan 1)
  10. [<Test>] member test.
  11. ``Number 1 should fail to be less than 0`` ()=
  12. shouldFail(fun () -> 1 |> should be (lessThan 0))
  13. [<Test>] member test.
  14. ``Number 1 should'nt be less than 0`` ()=
  15. 1 |> should'nt be (lessThan 0)
  16. [<Test>] member test.
  17. ``Number 0 should fail to not be less than 1`` ()=
  18. shouldFail(fun () -> 0 |> should'nt be (lessThan 1))
  19. [<Test>] member test.
  20. ``Number 0 should'nt be less than 0`` ()=
  21. 0 |> should'nt be (lessThan 0)
  22. [<Test>] member test.
  23. ``Number 1 should fail to be greater than 1`` ()=
  24. shouldFail(fun () -> 1 |> should be (lessThan 1))
  25. [<TestFixture>]
  26. type ``Less Than tests or Equal`` ()=
  27. // Collection
  28. [<Test>] member test.
  29. ``Number 0 should be less than 1`` ()=
  30. 0 |> should be (lessThanOrEqual 1)
  31. [<Test>] member test.
  32. ``Number 1 should fail to be less than 0`` ()=
  33. shouldFail(fun () -> 1 |> should be (lessThanOrEqual 0))
  34. [<Test>] member test.
  35. ``Number 1 should'nt be less than 0`` ()=
  36. 1 |> should'nt be (lessThanOrEqual 0)
  37. [<Test>] member test.
  38. ``Number 0 should fail to not be less than 1`` ()=
  39. shouldFail(fun () -> 0 |> should'nt be (lessThanOrEqual 1))
  40. [<Test>] member test.
  41. ``Number 0 should be less than 0`` ()=
  42. 0 |> should be (lessThanOrEqual 0)
  43. [<Test>] member test.
  44. ``Number 1 should fail to not be greater than 1`` ()=
  45. shouldFail(fun () -> 1 |> should'nt be (lessThanOrEqual 1))