Exemplo n.º 1
0
        [TestCase(" ")]    //failed
        public void LaySoKhachToiDa(int so)
        {
            //Arr
            var BanAnUseCase = new BanAnUseCase();

            //Act
            int actualCount = BanAnUseCase.LaySoKhachToiDa(so);

            //Assert
            Assert.IsTrue(actualCount != -1, "So khach toi da khong hop le");
        }
Exemplo n.º 2
0
        public void GetTableList_ReturnNotNull()
        {
            //Arr
            var BanAnUseCase = new BanAnUseCase();

            //Act
            List <BANAN> tablelist   = BanAnUseCase.LoadTableList();
            var          actualCount = tablelist.Count;

            //Assert
            Assert.IsTrue(actualCount > 0, "Khong co ban nao dang trong");
        }
Exemplo n.º 3
0
        public void GetTableListUC_ReturnNotNull()
        {
            //Arr
            var BanAnUseCase = new BanAnUseCase();

            //Act
            List <BANAN> tablelist   = BanAnUseCase.LoadTableListUC();
            var          actualCount = tablelist.Count;

            //Assert
            Assert.IsTrue(actualCount > 0, "Danh sach ban an dang rong");
        }
Exemplo n.º 4
0
        [TestCase(" ")]    //failed
        public void TimBanAn(string noidung)
        {
            //Arr
            var BanAnUseCase  = new BanAnUseCase();
            var expectedCount = 1;

            //Act
            List <BANAN> timBanAn    = BanAnUseCase.TimBanAn(noidung);
            var          actualCount = timBanAn.Count;

            //Assert
            Assert.IsTrue(actualCount == expectedCount, "Khong tim thay ban");
        }
Exemplo n.º 5
0
        [TestCase(" ", " ")]    //failed
        public void SwitchTable(int mab, int tinhtrang)
        {
            //Arr
            var BanAnUseCase  = new BanAnUseCase();
            var expectedCount = 1;

            //Act
            int chuyenBanAn = BanAnUseCase.SwitchTable(mab, tinhtrang);
            var actualCount = chuyenBanAn;

            //Assert
            Assert.IsTrue(actualCount == expectedCount, "Chuyen that bai");
        }
Exemplo n.º 6
0
        [TestCase(" ", " ", " ")]   //failed
        public void SuaBanAn(int mab, int sokhach_toida, int tinhtrang)
        {
            //Arr
            var BanAnUseCase  = new BanAnUseCase();
            var expectedCount = 1;

            //Act
            int suaBanAn    = BanAnUseCase.SuaBanAn(mab, sokhach_toida, tinhtrang);
            var actualCount = suaBanAn;

            //Assert
            Assert.IsTrue(actualCount == expectedCount, "Sua that bai");
        }