Пример #1
0
            public void IGameRequestAggregateAsyncIsNull()
            {
                Action ctor = () => new GamesAsyncController(null);

                ctor.Should()
                .Throw <ArgumentNullException>()
                .WithMessage(ExceptionsUtility.NullArgument("gameRequestAggregateAsync"));
            }
            public void DbContextIsNull()
            {
                Action ctor = () => new RepositoryAsyncAggregate(null);

                ctor.Should()
                .Throw <ArgumentNullException>()
                .WithMessage(ExceptionsUtility.NullArgument("dbContext"));
            }
Пример #3
0
        public void LoggingBuilderCannotBeNull()
        {
            Action method = () => SerilogConfiguration.Configure(fakeHostingEnvironment, fakeConfiguration, null, A.Dummy <string>());

            method.Should()
            .Throw <ArgumentNullException>()
            .WithMessage(ExceptionsUtility.NullArgument("logging"));
        }
Пример #4
0
            public void IPlatformRequestAggregateIsNull()
            {
                Action ctor = () => new PlatformsController(null);

                ctor.Should()
                .Throw <ArgumentNullException>()
                .WithMessage(ExceptionsUtility.NullArgument("requestAggregate"));
            }
Пример #5
0
            public void ContextIsNull()
            {
                Action ctor = () => new Repository <DummyEntity>(null);

                ctor.Should()
                .Throw <ArgumentNullException>()
                .WithMessage(ExceptionsUtility.NullArgument("context"));
            }
Пример #6
0
            public void InputIsNull()
            {
                var response = request.Execute(null);

                response.Should().NotBeNull();
                response.ErrorResponse.Should().NotBeNull();
                response.ErrorResponse.ErrorSummary.Should().NotBeNullOrWhiteSpace();
                response.ErrorResponse.ErrorSummary.Should().BeEquivalentTo(ExceptionsUtility.NullArgument("input"));
            }
            public async Task InputIsNull()
            {
                var response = await request.ExecuteAsync(null);

                response.Should().NotBeNull();
                response.ErrorResponse.Should().NotBeNull();
                response.ErrorResponse.ErrorSummary.Should().NotBeNullOrWhiteSpace();
                response.ErrorResponse.ErrorSummary.Should().BeEquivalentTo(ExceptionsUtility.NullArgument("input"));
                response.StatusCode.HasValue.Should().BeTrue();
                response.StatusCode.Should().Be(500);
            }