diff --git a/test/Autofac.Test/Features/Decorators/DecoratorTests.cs b/test/Autofac.Test/Features/Decorators/DecoratorTests.cs index c41bc2e8f..81fd4f4b2 100644 --- a/test/Autofac.Test/Features/Decorators/DecoratorTests.cs +++ b/test/Autofac.Test/Features/Decorators/DecoratorTests.cs @@ -13,12 +13,12 @@ public interface IService { } - public interface IDecoratedService + public interface IDecoratedService : IService { IDecoratedService Decorated { get; } } - public class ImplementorA : IDecoratedService, IService + public class ImplementorA : IDecoratedService { public IDecoratedService Decorated => this; } @@ -189,12 +189,9 @@ public void DecoratedRegistrationCanIncludeImplementationType() Assert.IsType(container.Resolve()); } - [Fact(Skip = "Issue #963")] + [Fact] public void DecoratedRegistrationCanIncludeOtherServices() { - // Issue #963 - Make sure IDecoratedService does _not_ derive from - // IService. The idea is that a component may provide multiple - // services but only one of them may be decorated. var builder = new ContainerBuilder(); builder.RegisterType().As().As(); builder.RegisterDecorator(); @@ -207,7 +204,7 @@ public void DecoratedRegistrationCanIncludeOtherServices() Assert.NotNull(decoratedServiceRegistration); Assert.Same(serviceRegistration, decoratedServiceRegistration); - Assert.IsType(container.Resolve()); + Assert.IsType(container.Resolve()); Assert.IsType(container.Resolve()); } diff --git a/test/Autofac.Test/Features/Decorators/OpenGenericDecoratorTests.cs b/test/Autofac.Test/Features/Decorators/OpenGenericDecoratorTests.cs index 1058c7761..bca06a1d1 100644 --- a/test/Autofac.Test/Features/Decorators/OpenGenericDecoratorTests.cs +++ b/test/Autofac.Test/Features/Decorators/OpenGenericDecoratorTests.cs @@ -14,12 +14,12 @@ public interface IService { } - public interface IDecoratedService + public interface IDecoratedService : IService { IDecoratedService Decorated { get; } } - public class ImplementorA : IDecoratedService, IService + public class ImplementorA : IDecoratedService { public IDecoratedService Decorated => this; } @@ -186,12 +186,9 @@ public void DecoratedRegistrationCanIncludeImplementationType() Assert.IsType>(container.Resolve>()); } - [Fact(Skip = "Issue #963")] + [Fact] public void DecoratedRegistrationCanIncludeOtherServices() { - // Issue #963 - Make sure IDecoratedService does _not_ derive from - // IService. The idea is that a component may provide multiple - // services but only one of them may be decorated. var builder = new ContainerBuilder(); builder.RegisterGeneric(typeof(ImplementorA<>)).As(typeof(IDecoratedService<>)).As(typeof(IService<>)); builder.RegisterGenericDecorator(typeof(DecoratorA<>), typeof(IDecoratedService<>)); @@ -204,7 +201,7 @@ public void DecoratedRegistrationCanIncludeOtherServices() Assert.NotNull(decoratedServiceRegistration); Assert.Same(serviceRegistration, decoratedServiceRegistration); - Assert.IsType>(container.Resolve>()); + Assert.IsType>(container.Resolve>()); Assert.IsType>(container.Resolve>()); }