public void WithTwoDecoratorsWithTyped() { // Arrange Sut.AddDecorator<IMagicInterface>((r, s) => new MagicClassDecorator1(s)); Sut.AddDecorator<IMagicInterface>((r, s) => new MagicClassDecorator2(s)); // Act var instance = Sut.Decorate(typeof(IMagicInterface), new MagicClass(), _resolverContextMock.Object); // Assert instance.Should().BeAssignableTo<MagicClassDecorator2>(); var magicClassDecorator2 = (MagicClassDecorator2)instance; magicClassDecorator2.Inner.Should().BeAssignableTo<MagicClassDecorator1>(); var magicClassDecorator1 = (MagicClassDecorator1)magicClassDecorator2.Inner; magicClassDecorator1.Inner.Should().BeAssignableTo<MagicClass>(); }