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); }
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); }
public void BusinessLogicCreation() { BusinessLogic bl = new BusinessLogicImpl(); Assert.IsTrue(bl != null); }
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); }