示例#1
0
 public void throw_exception_when_registered_manual_two_times_test()
 {
     var container = new InstancesContainer();
     container.RegisterSingleton<RegisterManualTwoTimesClass>();
     Assert.Throws<DependencyInjectionException>(() => container.RegisterSingleton<RegisterManualTwoTimesClass>());
 }
示例#2
0
 public void throw_exception_when_registered_by_attribute_and_manual_test()
 {
     var container = new InstancesContainer();
     Assert.Throws<DependencyInjectionException>(() => container.RegisterSingleton<RegisteredByAttributeAndManualClass>());
 }