Ejemplo n.º 1
0
		public void AttributeGetsTraceSourceFromCatalogIfAvailable()
		{
			TraceSourceCatalogService catalog = new TraceSourceCatalogService();
			Locator locator = new Locator();
			Builder builder = new Builder();
			locator.Add(new DependencyResolutionLocatorKey(typeof(ITraceSourceCatalogService), null), catalog);

			MockTracedClass mock = builder.BuildUp<MockTracedClass>(locator, null, null);

			Assert.AreEqual(1, catalog.TraceSources.Count);
			Assert.IsNotNull(mock.TraceSource);
		}
 public void SetUp()
 {
     catalog = new TraceSourceCatalogService();
 }