public void WhenComposingParts_ThenDelegates() { var delegating = new ContainerCompositionServiceAdapter(this.container); var consumer = new FooConsumer(); delegating.ComposeParts(consumer); Assert.NotNull(consumer.Foo); }
public void WhenComposingParts_ThenDelegates() { var delegating = new ContainerCompositionServiceAdapter(this.container); var consumer = new FooConsumer(); delegating.ComposeParts(consumer); Assert.NotNull(consumer.Foo); }
public void WhenSatisfyingImportsOnce_ThenDelegates() { var delegating = new ContainerCompositionServiceAdapter(this.container); var consumer = new FooConsumer(); delegating.SatisfyImportsOnce(AttributedModelServices.CreatePart(consumer)); Assert.NotNull(consumer.Foo); }
public static void CountEquals(int expected, FooConsumer consumer) { int actualCount = 0; while (consumer.ConsumeItem() != null) { actualCount++; } NUnit.Framework.Assert.AreEqual(expected, actualCount); }
public void WhenDisposing_ThenDoesNotDisposeInnerService() { var delegating = new ContainerCompositionServiceAdapter(this.container); delegating.Dispose(); var consumer = new FooConsumer(); delegating.ComposeParts(consumer); Assert.NotNull(consumer.Foo); }
public void WhenDisposing_ThenDoesNotDisposeInnerService() { var delegating = new ContainerCompositionServiceAdapter(this.container); delegating.Dispose(); var consumer = new FooConsumer(); delegating.ComposeParts(consumer); Assert.NotNull(consumer.Foo); }
public void WhenSatisfyingImportsOnce_ThenDelegates() { var delegating = new ContainerCompositionServiceAdapter(this.container); var consumer = new FooConsumer(); delegating.SatisfyImportsOnce(AttributedModelServices.CreatePart(consumer)); Assert.NotNull(consumer.Foo); }