public void ShouldResolveTypeWithOneParameterlessCtor() { Sioc container = new Sioc(); container.Register<IInterface, ConcreteWithOneParameterlessCtor>(); var concrete = container.Resolve<IInterface>(); Assert.AreEqual(typeof(ConcreteWithOneParameterlessCtor), concrete.GetType()); }
public void ShouldThrowNotAssignableException() { Sioc container = new Sioc(); Assert.Throws<NotAssignableFromType>( () => container.Register<IInterface, ConcreteNotImplementsInterface>() ); }