public ConstructorDependentClass( ClassCreatedWithAContext concreteDependency, IClassCreatedWithAContext abstractDependency) { ConcreteDependency = concreteDependency ?? throw new ArgumentNullException(nameof(concreteDependency)); AbstractDependency = abstractDependency ?? throw new ArgumentNullException(nameof(abstractDependency)); }
public void ItShouldSpecifyTheServiceTypeTheAsInterfaceIfRequestingTheInterface() { // Arrange Guid data = Guid.NewGuid(); // Act IClassCreatedWithAContext actual = Container.GetService <IClassCreatedWithAContext>(data); // Assert actual.Should().NotBeNull().And.BeOfType <ClassCreatedWithAContext>(); actual.Context.Extra.Should().Be(data); actual.Context.ServiceType.Should().Be(typeof(IClassCreatedWithAContext)); actual.Context.RecipientType.Should().Be(typeof(void)); }