コード例 #1
0
        public void CreateNuggetValidator_NullMember_ReturnsInvalidResult()
        {
            var command = new CreateNuggetCommand();
            command.Title = "My Title";
            command.Description = "My Description";

            var validator = new CreateNuggetValidator();
            var result = validator.ValidateCommand(command);

            Assert.AreEqual(false, result.Successful);
        }
コード例 #2
0
        public void CreateNuggetValidator_EmptyTitle_ReturnsInvalidResult()
        {
            //Arrange
            var command = new CreateNuggetCommand();
            command.Description = "My Description";
            command.Member = new Member();

            //Act
            var validator = new CreateNuggetValidator();
            var result = validator.ValidateCommand(command);

            //Assert
            Assert.AreEqual(false, result.Successful);
        }