PageRenderTime 103ms CodeModel.GetById 23ms app.highlight 13ms RepoModel.GetById 65ms app.codeStats 1ms

/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
 1namespace FsxUnit.Test
 2open NUnit.Framework
 3open FsxUnit
 4
 5[<TestFixture>]
 6type ``Less Than tests`` ()=
 7    // Collection   
 8    [<Test>] member test.
 9     ``Number 0 should be less than 1`` ()=
10        0 |> should be (lessThan 1)
11
12    [<Test>] member test.
13     ``Number 1 should fail to be less than 0`` ()=
14        shouldFail(fun () -> 1 |> should be (lessThan 0))
15
16    [<Test>] member test.
17     ``Number 1 should'nt be less than 0`` ()=
18        1 |> should'nt be (lessThan 0)
19
20    [<Test>] member test.
21     ``Number 0 should fail to not be less than 1`` ()=
22        shouldFail(fun () -> 0 |> should'nt be (lessThan 1))
23
24    [<Test>] member test.
25     ``Number 0 should'nt be less than 0`` ()=
26        0 |> should'nt be (lessThan 0)
27    
28    [<Test>] member test.
29     ``Number 1 should fail to be greater than 1`` ()=
30        shouldFail(fun () -> 1 |> should be (lessThan 1))
31    
32[<TestFixture>]
33type ``Less Than tests or Equal`` ()=
34    // Collection   
35    [<Test>] member test.
36     ``Number 0 should be less than 1`` ()=
37        0 |> should be (lessThanOrEqual 1)
38
39    [<Test>] member test.
40     ``Number 1 should fail to be less than 0`` ()=
41        shouldFail(fun () -> 1 |> should be (lessThanOrEqual 0))
42
43    [<Test>] member test.
44     ``Number 1 should'nt be less than 0`` ()=
45        1 |> should'nt be (lessThanOrEqual 0)
46
47    [<Test>] member test.
48     ``Number 0 should fail to not be less than 1`` ()=
49        shouldFail(fun () -> 0 |> should'nt be (lessThanOrEqual 1))
50
51    [<Test>] member test.
52     ``Number 0 should be less than 0`` ()=
53        0 |> should be (lessThanOrEqual 0)
54    
55    [<Test>] member test.
56     ``Number 1 should fail to not be greater than 1`` ()=
57        shouldFail(fun () -> 1 |> should'nt be (lessThanOrEqual 1))
58    
59
60