1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
using System;
using NUnit.Framework;
using System.Windows.Forms;
using System.Drawing;
namespace MonoTests.System.Windows.Forms
{
[TestFixture]
public class LinkAreaTest : TestHelper
{
[Test]
public void LinkAreaToString ()
{
LinkArea la = new LinkArea ();
Assert.AreEqual ("{Start=0, Length=0}", la.ToString (), "A1");
la = new LinkArea (0, 0);
Assert.AreEqual ("{Start=0, Length=0}", la.ToString (), "A2");
la = new LinkArea (4, 75);
Assert.AreEqual ("{Start=4, Length=75}", la.ToString (), "A3");
}
[Test]
public void Equality ()
{
LinkArea l1 = new LinkArea (2, 4);
LinkArea l2 = new LinkArea (4, 6);
LinkArea l3 = new LinkArea (2, 4);
Assert.IsTrue (l1 == l3, "A1");
Assert.IsFalse (l1 == l2, "A2");
Assert.IsFalse (l2 == l3, "A3");
}
[Test]
public void Inequality ()
{
LinkArea l1 = new LinkArea (2, 4);
LinkArea l2 = new LinkArea (4, 6);
LinkArea l3 = new LinkArea (2, 4);
Assert.IsFalse (l1 != l3, "A1");
Assert.IsTrue (l1 != l2, "A2");
Assert.IsTrue (l2 != l3, "A3");
}
}
}
|