public void it_should_throw_an_ArgumentNullException_when_the_key_is_null_for_the_type_specified() { using (var helper = new AutofacServiceLocatorHelper()) { helper.ValidateKey( helper.AutofacServiceLocator.Invoking(x => x.Register((string)null, typeof(MyImplementation)))); helper.ValidateKey( helper.AutofacServiceLocator.Invoking(x => x.Register(string.Empty, typeof(MyImplementation)))); helper.ValidateKey( helper.AutofacServiceLocator.Invoking(x => x.Register(" ", typeof(MyImplementation)))); } }
it_should_throw_an_ArgumentNullException_when_the_key_specified_is_null_for_the_generic_contract_and_the_generic_type_specified () { using (var helper = new AutofacServiceLocatorHelper()) { helper.ValidateKey( helper.AutofacServiceLocator.Invoking( x => x.Register <IMyTestingContract, MyImplementation>(null))); helper.ValidateKey( helper.AutofacServiceLocator.Invoking( x => x.Register <IMyTestingContract, MyImplementation>(string.Empty))); helper.ValidateKey( helper.AutofacServiceLocator.Invoking(x => x.Register <IMyTestingContract, MyImplementation>(" "))); } }
public void it_should_throw_an_ArgumentNullException_when_the_key_specified_is_null_for_the_generic_contract_and_the_generic_type_specified() { using (var helper = new AutofacServiceLocatorHelper()) { helper.ValidateKey( helper.AutofacServiceLocator.Invoking( x => x.Register<IMyTestingContract, MyImplementation>(null))); helper.ValidateKey( helper.AutofacServiceLocator.Invoking( x => x.Register<IMyTestingContract, MyImplementation>(string.Empty))); helper.ValidateKey( helper.AutofacServiceLocator.Invoking(x => x.Register<IMyTestingContract, MyImplementation>(" "))); } }
public void it_should_throw_an_ArgumentNullException_when_the_key_is_null_for_the_type_specified() { using (var helper = new AutofacServiceLocatorHelper()) { helper.ValidateKey( helper.AutofacServiceLocator.Invoking(x => x.Register((string) null, typeof (MyImplementation)))); helper.ValidateKey( helper.AutofacServiceLocator.Invoking(x => x.Register(string.Empty, typeof (MyImplementation)))); helper.ValidateKey( helper.AutofacServiceLocator.Invoking(x => x.Register(" ", typeof (MyImplementation)))); } }