예제 #1
0
        public void GetById()
        {
            SLTempsController slTemps = new SLTempsController();

            SLTemp sl = slTemps.GetById(0);

            Assert.AreEqual("Mikail", sl.FirstName);
        }
예제 #2
0
        public void GetByIdNull()
        {
            SLTempsController slTemps = new SLTempsController();

            SLTemp sl = slTemps.GetById(10);

            Assert.IsNull(sl);
        }
예제 #3
0
        public void AmountOfObj()
        {
            SLTempsController slTemps = new SLTempsController();

            List <SLTemp> slTempsList = slTemps.GetList();

            Assert.AreEqual(2, slTempsList.Count);
        }
예제 #4
0
        public void TestDelete()
        {
            SLTempsController slTemps = new SLTempsController();

            List <SLTemp> slTempsList = slTemps.GetList();

            int preCount = slTempsList.Count;

            bool c1 = slTemps.DeleteSLTemp(1);

            List <SLTemp> slTempsList2 = slTemps.GetList();

            Assert.AreEqual(preCount - 1, slTempsList2.Count);
        }