コード例 #1
0
 public TypeOfIngredientServiceTests()
 {
     this.service = new TypeOfIngredientService();
     service.Add(new TypeOfIngredient { Name = "groats" }
         );
     service.Add(new TypeOfIngredient { Name = "spice" }
         );
 }
コード例 #2
0
 public TypeOfIngredientServiceTests()
 {
     this.service = new TypeOfIngredientService();
     service.Add(new TypeOfIngredient {
         Name = "groats"
     }
                 );
     service.Add(new TypeOfIngredient {
         Name = "spice"
     }
                 );
 }
コード例 #3
0
        public void AddTest()
        {
            var name = Guid.NewGuid().ToString();
            var newTypeOfIngredient = new TypeOfIngredient
            {
                Name = name
            };
            var AddedTypeOfIngredient = service.Add(newTypeOfIngredient);

            Assert.IsNotNull(AddedTypeOfIngredient);
            Assert.IsTrue(AddedTypeOfIngredient.Id > 0);
            Assert.AreEqual(AddedTypeOfIngredient.Name, name);
        }