public void TestForNotNull() { MiapoPracticProjectGAN.Windows.MainWindowMoreInfo page = new MiapoPracticProjectGAN.Windows.MainWindowMoreInfo(); MiapoPracticProjectGAN.Windows.ShipmentMoreInfo page2 = new MiapoPracticProjectGAN.Windows.ShipmentMoreInfo(); MiapoPracticProjectGAN.Windows.EmployeeMoreInfo page3 = new MiapoPracticProjectGAN.Windows.EmployeeMoreInfo(); Assert.IsNotNull(page.testupload("", "", 0, 0)); Assert.IsNotNull(page2.Loadtobd(0, 0, "")); Assert.IsNotNull(page3.testSave(1, "", "", "", "", "")); }
public void TestForCorrectValue() { MiapoPracticProjectGAN.Windows.MainWindowMoreInfo page = new MiapoPracticProjectGAN.Windows.MainWindowMoreInfo(); MiapoPracticProjectGAN.Windows.ShipmentMoreInfo page2 = new MiapoPracticProjectGAN.Windows.ShipmentMoreInfo(); MiapoPracticProjectGAN.Windows.EmployeeMoreInfo page3 = new MiapoPracticProjectGAN.Windows.EmployeeMoreInfo(); Assert.IsInstanceOfType(page.testupload("", "", 0, 0), typeof(bool)); Assert.IsNotInstanceOfType(page.testupload("", "", 0, 0), typeof(string)); Assert.IsNotInstanceOfType(page.testupload("", "", 0, 0), typeof(int)); Assert.IsNotInstanceOfType(page.testupload("", "", 0, 0), typeof(decimal)); Assert.IsNotInstanceOfType(page.testupload("", "", 0, 0), typeof(char)); Assert.IsInstanceOfType(page2.Loadtobd(0, 0, ""), typeof(bool)); Assert.IsNotInstanceOfType(page2.Loadtobd(0, 0, ""), typeof(string)); Assert.IsNotInstanceOfType(page2.Loadtobd(0, 0, ""), typeof(int)); Assert.IsNotInstanceOfType(page2.Loadtobd(0, 0, ""), typeof(decimal)); Assert.IsNotInstanceOfType(page2.Loadtobd(0, 0, ""), typeof(char)); Assert.IsInstanceOfType(page3.testSave(1, "", "", "", "", ""), typeof(bool)); Assert.IsNotInstanceOfType(page3.testSave(1, "", "", "", "", ""), typeof(string)); Assert.IsNotInstanceOfType(page3.testSave(1, "", "", "", "", ""), typeof(int)); Assert.IsNotInstanceOfType(page3.testSave(1, "", "", "", "", ""), typeof(decimal)); Assert.IsNotInstanceOfType(page3.testSave(1, "", "", "", "", ""), typeof(char)); }
public void TestForWorkUpdateInformationProducts() { MiapoPracticProjectGAN.Windows.MainWindowMoreInfo page = new MiapoPracticProjectGAN.Windows.MainWindowMoreInfo(); MiapoPracticProjectGAN.Windows.ShipmentMoreInfo page2 = new MiapoPracticProjectGAN.Windows.ShipmentMoreInfo(); MiapoPracticProjectGAN.Windows.EmployeeMoreInfo page3 = new MiapoPracticProjectGAN.Windows.EmployeeMoreInfo(); Assert.IsFalse(page.testupload("", "", 0, 0)); Assert.IsFalse(page.testupload("", "new", 1, 1)); Assert.IsFalse(page.testupload("new", "", 1, 1)); Assert.IsFalse(page.testupload("new", "new", 0, 1)); Assert.IsFalse(page.testupload("new", "new", 1, 0)); Assert.IsTrue(page.testupload("Отвертка", "Сыр-косичка", 21, 100)); //Assert.IsTrue(page.testupload("Сыр-косичка", "Отвертка", 100, 21)); Assert.IsFalse(page2.Loadtobd(0, 1, "1")); Assert.IsFalse(page2.Loadtobd(1, 0, "1")); Assert.IsFalse(page2.Loadtobd(1, 1, "")); Assert.IsTrue(page2.Loadtobd(1, 1, "Мясо")); Assert.IsFalse(page3.testSave(1, "", "1", "1", "1", "1")); Assert.IsFalse(page3.testSave(1, "1", "", "1", "1", "1")); Assert.IsFalse(page3.testSave(1, "1", "1", "", "1", "1")); Assert.IsFalse(page3.testSave(1, "1", "1", "1", "", "1")); Assert.IsFalse(page3.testSave(1, "1", "1", "1", "1", "")); Assert.IsTrue(page3.testSave(1, "Alehandro1", "Ivanov1", "MiDlovich1", "*****@*****.**", "8(800)1553535")); }