示例#1
0
        public void ParseInputsTestSubmitVehicles()
        {
            Assesment_1.MainWindow main = new Assesment_1.MainWindow();
            bool Expected = false;
            bool Result   = main.ParseInputs("Submit", 0, "1", "1", "12345", "1", "1", "1");

            Assert.AreEqual(Result, Expected);
        }
示例#2
0
        public void ParseInputsTestMouse()
        {
            Assesment_1.MainWindow main = new Assesment_1.MainWindow();
            bool Expected = true;
            bool Result   = main.ParseInputs("Mouse", 0, "1", "1", "1", "1", "1", "1");

            Assert.AreEqual(Result, Expected);
        }
示例#3
0
        public void totalFilledTest()
        {
            Assesment_1.MainWindow main = new Assesment_1.MainWindow();
            string connstring           =
                "server=localhost;" +
                "user=AJC_Car_asses1;" +
                "database=ajc_car_asses1;" +
                "port=3306;" +
                "password=A*crewdev;";

            string Expected = "51";
            string Result   = main.totalFilled(1, 20, connstring);

            //Assert
            Assert.AreEqual(Result, Expected);
        }
示例#4
0
        public void LastServiceTest()
        {
            Assesment_1.MainWindow main = new Assesment_1.MainWindow();
            string connstring           =
                "server=localhost;" +
                "user=AJC_Car_asses1;" +
                "database=ajc_car_asses1;" +
                "port=3306;" +
                "password=A*crewdev;";

            string Expected = "30.0";
            string Result   = main.LastService(3, 13, connstring);

            //Assert
            Assert.AreEqual(Result, Expected);
        }