public void TestMethodGame() { FormQuadShulte form = new FormQuadShulte(); PrivateObject po = new PrivateObject(form); po.Invoke("Game", 1, 1); }
private void buttonQuadShulte_Click(object sender, EventArgs e) { FormQuadShulte formQuadShulte = new FormQuadShulte(); formQuadShulte.Show(); formQuadShulte.Owner = this; Hide(); }
public void TestMethodNewGamebutton_Click() { FormQuadShulte form = new FormQuadShulte(); PrivateObject po = new PrivateObject(form); po.Invoke("NewGamebutton_Click", null, new object[] { null, null }); }
public void TestMethodShowRules() { FormQuadShulte form = new FormQuadShulte(); PrivateObject po = new PrivateObject(form); po.Invoke("ShowRules"); }
public void TestMethodSaveGame() { FormQuadShulte form = new FormQuadShulte(); PrivateObject po = new PrivateObject(form); form.SaveGame(); }
public void TestMethodSavebutton_Click() { FormQuadShulte form = new FormQuadShulte(); PrivateObject po = new PrivateObject(form); form.NameGame = 4; po.Invoke("Savebutton_Click", null, new object[] { null, null }); form.NameGame = 3; po.Invoke("Savebutton_Click", null, new object[] { null, null }); }
public void TestMethodDrawField() { FormQuadShulte form = new FormQuadShulte(); PrivateObject po = new PrivateObject(form); form.NameGame = 4; po.Invoke("DrawField"); form.NameGame = 3; po.Invoke("DrawField"); }
public void TestMethodOpenGame() { FormQuadShulte form = new FormQuadShulte(); PrivateObject po = new PrivateObject(form); form.SaveGame(); var lines = new[] { "0", "7", "2", "6", "1075", "т в ф ц г", "у л ч а и", "й ш е с о", "х ж б р к", "м д п н з" }; po.SetField("key", 2); System.IO.File.WriteAllLines("QuadShulte_save.txt", lines); form.OpenGame(); po.Invoke("OpenGame");/* * lines = new[] { "1", * "7", * "2", * "6", * "1075", * "т в ф ц г", * "у л ч а и", * "й ш е с о", * "х ж б р к", * "м д п н з" }; * * System.IO.File.WriteAllLines("QuadShulte_save.txt", lines); * form.OpenGame(); * lines = new[] { "2", * "7", * "2", * "6", * "1075", * "т в ф ц г", * "у л ч а и", * "й ш е с о", * "х ж б р к", * "м д п н з" }; * System.IO.File.WriteAllLines("QuadShulte_save.txt", lines); * form.OpenGame();*/ }
public void TestMethodIsFinish() { FormQuadShulte form = new FormQuadShulte(); form.Level = 1; PrivateObject po = new PrivateObject(form); po.SetField("num", 2); Assert.AreEqual(form.IsFinish(), true); form.NameGame = 2; form.Level = 1; po.SetField("num", 1073); Assert.AreEqual(form.IsFinish(), true); form.NameGame = 4; form.Level = 1; po.SetField("num", 2); Assert.AreEqual(form.IsFinish(), true); }