More Code Gen Testing
Posted on April 8, 2008Here's another test:
[Test]
public void VerifyInheritsFrom()
{
NamespaceDeclaration nsdecl =
new NamespaceDeclaration("TestContainer");
nsdecl.AddClass("Manager")
.InheritsFrom(nsdecl.AddClass("Employee"));
using (DomTester dom = new DomTester(nsdecl))
{
Assert.IsTrue(dom.Type("Manager").InheritsFrom("Employee"));
}
}
| |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
That snippet tests the compiled version of the following source that was generated: