コード例 #1
0
        public void Test_ToppingMapping()
        {
            // arrange
            MapperTopping mapperTopping = new MapperTopping();
            var           sut           = new DBTopping();

            sut.TOPPING = TOPPINGS.BACON;

            // act
            var sut2   = mapperTopping.Map(sut);
            var actual = sut2;

            // assert
            Assert.True(actual.TOPPING == TOPPINGS.BACON);
        }
コード例 #2
0
 public void Add(ATopping genericType)
 {
     context.DBToppings.Add(mapperTopping.Map(genericType, context));
     context.SaveChanges();
 }