예제 #1
0
        public void task_395_2()         //Удаление не существующей строки
        {
            //arrange
            MEnclosures gr       = new MEnclosures("А", "КГУ", "Дзержинского", "111111", "1");
            bool        expected = false;
            //act
            СEnclosures cg     = new СEnclosures();
            bool        actual = cg.Delete(gr);

            //assert
            Assert.AreEqual(expected, actual);
        }
        public void Task_397_1()         //Ввод в пустую таблицу
        {
            //arrange
            MEnclosures gr       = new MEnclosures("А", "КГУ", "Дзержинского", "111111", "1");
            СEnclosures cg       = new СEnclosures();
            bool        expected = true;
            //act
            bool actual = cg.Insert(gr);

            //assert
            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void task_395_1()
        {
            // arrange
            MEnclosures gr       = new MEnclosures("А", "КГУ", "Дзержинского", "111111", "1");
            bool        expected = true;
            //act
            СEnclosures cg = new СEnclosures();

            cg.Insert(gr);
            bool actual = cg.Delete(gr);

            //assert
            Assert.AreEqual(expected, actual);
        }
        public void Task_397_8()         //Дублирование ВУЗа
        {
            //arrange
            MEnclosures gr       = new MEnclosures("А", "КГУ", "Дзержинского", "111111", "1");
            СEnclosures cg       = new СEnclosures();
            bool        expected = true;
            bool        g        = cg.Insert(gr);
            //act
            MEnclosures gr1    = new MEnclosures("Б", "КГУ", "Дзержинск", "222222", "2");
            bool        actual = cg.Insert(gr1);

            //assert
            Assert.AreEqual(expected, actual);
        }
        public void Task_397_5()         //Полностью отличные атрибуты
        {
            //arrange
            MEnclosures gr       = new MEnclosures("А", "КГУ", "Дзержинского", "111111", "1");
            СEnclosures cg       = new СEnclosures();
            bool        expected = true;
            bool        g        = cg.Insert(gr);
            //act
            MEnclosures gr1    = new MEnclosures("Б", "КГТУ", "Дзержинск", "222222", "2");
            bool        actual = cg.Insert(gr1);

            //assert
            Assert.AreEqual(expected, actual);
        }
        public void Task_397_2_4()         //Дублирование телефона  примечания и улицы
        {
            //arrange
            MEnclosures gr       = new MEnclosures("А", "КГУ", "Дзержинского", "111111", "1");
            СEnclosures cg       = new СEnclosures();
            bool        expected = true;
            bool        g        = cg.Insert(gr);
            //act
            MEnclosures gr1    = new MEnclosures("Б", "КГТУ", "Дзержинского", "111111", "1");
            bool        actual = cg.Insert(gr1);

            //assert
            Assert.AreEqual(expected, actual);
        }
예제 #7
0
        public void task_396_1()
        {
            //arrange
            MEnclosures gr = new MEnclosures("А", "КГУ", "Дзержинского", "111111", "1");
            СEnclosures cg = new СEnclosures();

            cg.Insert(gr);
            bool expected = true;

            //act
            gr.Address = "Ивановская";
            gr.Phone   = "222222";
            gr.Comment = "2";
            bool actual = cg.Update(gr);

            //assert
            Assert.AreEqual(expected, actual);
        }