public void ItShouldFactorAClassWithMultiplePublicConstructors() { // Act ClassWithMultiplePublicConstructors actual = GetService <ClassWithMultiplePublicConstructors>(); // Assert actual .Should() .NotBeNull() .And.BeSameAs(ExpectedMultiplePublicConstructors); }
public WhenFactoringClassesWithInvalidConstructorsWithoutAContext(ITestOutputHelper output) { ExpectedNoPublicConstructor = ClassWithoutAPublicConstructor.Create(); ExpectedMultiplePublicConstructors = new ClassWithMultiplePublicConstructors(); _container = new RegistrationSetup() .RegisterFactory(() => ExpectedNoPublicConstructor) .RegisterFactory(() => ExpectedMultiplePublicConstructors) .Construct(GetType().GetTypeInfo().Assembly, out string code); output.WriteLine(code); }