Exemplo n.º 1
0
 public void Update(Invention inventionCategory, InventionDto dto)
 {
     inventionCategory.SetCode(dto.Code);
     inventionCategory.SetName(dto.Name);
     inventionCategory.Description = dto.Description;
     inventionCategory.CategoryId  = dto.CategoryId;
     inventionCategory.SetPrice(dto.Price);
     inventionCategory.Enable = dto.Enable;
 }
Exemplo n.º 2
0
        public void SetName_UsingInvalidName_ThrowsBusinessRuleException(string name)
        {
            //Arrange
            var invention = new Invention();

            //Act
            TestDelegate testDelegate = () => invention.SetName(name);

            //Assert
            Assert.Throws <BusinessRuleException>(testDelegate);
        }
Exemplo n.º 3
0
        public void SetName_UsingValidName_SetsNameToInvention()
        {
            //Arrange
            var invention = new Invention();

            //Act
            invention.SetName("test");

            //Assert
            Assert.IsTrue(invention.Name == "test");
        }