示例#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
 static void Main(string[] args)
 {
     BusinessLogicImpl bl = new BusinessLogicImpl();
       Button button1 = new Button(-1, "Button 1", "message 1");
       Button button2 = new Button(-1, "Button 2", "message 2");
       Button button3 = new Button(-1, "Button 3", "message 3");
       Button button4 = new Button(-1, "Button 4", "message 4");
       Button button5 = new Button(-1, "Button 5", "message 5");
       Button button6 = new Button(-1, "Button 6", "message 6");
       Preset preset = new Preset(-1, "Test-Preset", "green", new List<Button> (
     new Button[] { button1, button2, button3, button4, button5, button6}));
       bl.InsertPresetEager(preset);
 }
示例#4
0
 public void BusinessLogicCreation()
 {
     BusinessLogic bl = new BusinessLogicImpl();
       Assert.IsTrue(bl != null);
 }
示例#5
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);
 }