New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: C#

No Title

81 Views
Copy Code Show/Hide Line Numbers
public class TypeLoaderTests
{
    [Fact]
    public void Load_should_extract_public_types_from_assembly()
    {
        var assembly =
            CSharpAssemblyFactory.Compile(
                @"
                    public class Foo { }
                    public class Bar { }
                ");
 
        var typeLoader =
            new TypeLoader();
        typeLoader.Load(assembly);
 
        var types =
            typeLoader.GetTypes(t => true);
 
        types.Count().ShouldEqual(2);
    }
}
by TheCodeJunkie
  January 07, 2010 @ 2:11pm

Add a comment


Report Abuse
brought to you by:
West Wind Techologies


If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate