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"); }
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"); }
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"); }