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

Unit test to verify that the code at http://codepaste.net/576ev9 works

108 Views
Copy Code Show/Hide Line Numbers
public class Fixture
{
    private CompositionContainer _container;
 
    public Fixture()
    {
        var catalog = new AssemblyCatalog(Assembly.GetExecutingAssembly());
        _container = new CompositionContainer(catalog);
    }
 
    [Fact]
    public void Overriding_metadata_replaces_inherited_metadata()
    {
        var export =
            _container.GetExport<Analytics>();
 
        Assert.Equal("TEST", export.Value.TrackableItems.First().Metadata.Category);
    }
}
by TheCodeJunkie
  January 10, 2010 @ 3:05pm

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