コード例 #1
0
		public void RegisterServicesInto_ArrayOverloadCalledWithNullModule_ExpectArgumentNullExceptionWithCorrectParamName(RouteRegistrar registrar)
		{
			registrar.Invoking(x => x.RegisterServicesInto(null, typeof(object), typeof(string)))
				.ShouldThrow<ArgumentNullException>().And.ParamName.Should().Be("module");
		}
コード例 #2
0
		public void WithDispatchContext_CalledWithNullContext_ExpectArgumentNullExceptionWithCorrectParamName(RouteRegistrar registrar)
		{
			registrar.Invoking(x => x.WithDispatchContext(null))
				.ShouldThrow<ArgumentNullException>().And.ParamName.Should().Be("context");
		}
コード例 #3
0
		public void RegisterServiceInto_CalledWithNullServiceType_ExpectArgumentNullExceptionWithCorrectParamName(
			RouteRegistrar registrar, NancyModule module)
		{
			registrar.Invoking(x => x.RegisterServiceInto(module, null))
				.ShouldThrow<ArgumentNullException>().And.ParamName.Should().Be("serviceType");
		}
コード例 #4
0
		public void RegisterServicesInto_EnumerableOverloadCalledWithNullServiceTypes_ExpectArgumentNullExceptionWithCorrectParamName(
			RouteRegistrar registrar, NancyModule module)
		{
			registrar.Invoking(x => x.RegisterServicesInto(module, (IEnumerable<Type>) null))
				.ShouldThrow<ArgumentNullException>().And.ParamName.Should().Be("serviceTypes");
		}
コード例 #5
0
 public void RegisterServicesInto_ArrayOverloadCalledWithNullModule_ExpectArgumentNullExceptionWithCorrectParamName(RouteRegistrar registrar)
 {
     registrar.Invoking(x => x.RegisterServicesInto(null, typeof(object), typeof(string)))
     .ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("module");
 }
コード例 #6
0
 public void RegisterServiceInto_CalledWithNullServiceType_ExpectArgumentNullExceptionWithCorrectParamName(
     RouteRegistrar registrar, NancyModule module)
 {
     registrar.Invoking(x => x.RegisterServiceInto(module, null))
     .ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("serviceType");
 }
コード例 #7
0
 public void WithDispatchContext_CalledWithNullContext_ExpectArgumentNullExceptionWithCorrectParamName(RouteRegistrar registrar)
 {
     registrar.Invoking(x => x.WithDispatchContext(null))
     .ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("context");
 }
コード例 #8
0
 public void RegisterServicesInto_EnumerableOverloadCalledWithNullServiceTypes_ExpectArgumentNullExceptionWithCorrectParamName(
     RouteRegistrar registrar, NancyModule module)
 {
     registrar.Invoking(x => x.RegisterServicesInto(module, (IEnumerable <Type>)null))
     .ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("serviceTypes");
 }