예제 #1
0
        public void MoveForumWithCategoryEmpty()
        {
            NForum.CQS.Commands.Forums.MoveForumCommand delete = new CQS.Commands.Forums.MoveForumCommand {
                Id = 3454657.ToString(),
                DestinationForumId = 32435657.ToString()
            };

            NForum.CQS.Validators.Forums.MoveForumValidator validator = new CQS.Validators.Forums.MoveForumValidator(TestUtils.GetInt32IdValidator());

            ValidationResult result = validator.Validate(delete);

            result.IsValid.Should().Be(true, "Ids was provided");
        }
예제 #2
0
        public void MoveForumWithEmptyId()
        {
            NForum.CQS.Commands.Forums.MoveForumCommand delete = new CQS.Commands.Forums.MoveForumCommand {
                Id = String.Empty,
                DestinationCategoryId = 32435657.ToString()
            };

            NForum.CQS.Validators.Forums.MoveForumValidator validator = new CQS.Validators.Forums.MoveForumValidator(TestUtils.GetInt32IdValidator());

            ValidationResult result = validator.Validate(delete);

            result.IsValid.Should().Be(false, "No Id was provided");
        }
예제 #3
0
        public void MoveForumWithIdAndEmptyDestinationIds()
        {
            NForum.CQS.Commands.Forums.MoveForumCommand delete = new CQS.Commands.Forums.MoveForumCommand {
                Id = 32456.ToString(),
                DestinationCategoryId = String.Empty,
                DestinationForumId    = String.Empty
            };

            NForum.CQS.Validators.Forums.MoveForumValidator validator = new CQS.Validators.Forums.MoveForumValidator(TestUtils.GetInt32IdValidator());

            ValidationResult result = validator.Validate(delete);

            result.IsValid.Should().Be(false, "No destination was given");
        }