示例#1
0
 public void InsertionDeletionTest()
 {
     BusinessLogic bl = new BusinessLogicImpl();
       Button button = new Button(-1, "Testbutton", "no assignment");
       Preset p = new Preset(-1, "TestPreset1", "green", new List<Button> { button });
       bool b = bl.InsertPresetEager(p);
       Assert.IsTrue(b == true);
       b = bl.DeletePresetEager(p);
       Assert.IsTrue(b == true);
 }
示例#2
0
 public void InsertionTestNotValid1()
 {
     BusinessLogic bl = new BusinessLogicImpl();
       Button button = new Button(-1, "Testbutton", "no assignment");
       Preset p = new Preset(-1,
     "TestPreset1dddddccccccccccccccccccccccccccvewvewvewvwccccccscaaaaaaasfhtrjzstnymsg,ts,tzs," +
     "sztdfbdbddsdvdsd sd sd sdveqwqqvwebwbwsfefewvwevwvewveevffffffffffffffffffffffffffffffffffff",
     "green", new List<Button> { button });
       bool b = bl.InsertPresetEager(p);
       Assert.IsTrue(b == false);
       b = bl.DeletePresetEager(p);
       Assert.IsTrue(b == false);
 }
示例#3
0
 public void UpdateTest3()
 {
     BusinessLogic bl = new BusinessLogicImpl();
       Button button = new Button(-1, "Testbutton", "no assignment");
       Preset p = new Preset(-1, "TestPreset1", "green", new List<Button> { button });
       bool b = bl.InsertPresetEager(p);
       Assert.IsTrue(b == true);
       p.buttons[0].name = "TestButton12";
       b = bl.UpdatePresetEager(p);
       Assert.IsTrue(b == true);
       b = bl.DeletePresetEager(p);
       Assert.IsTrue(b == true);
 }