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); }
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); }
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); }