Пример #1
0
        public void GetDietModeFromDbsFailTest()
        {
            string exp = "This is not going to happen";
            string res = MyMethodsLib.GetDietModeFromDbs("ladygoodwill", MyMethodsLib.GetConnectionString());

            Assert.AreNotEqual(exp, res);
        }
Пример #2
0
        public void GetDietModeFromDbsTest()
        {
            string exp = "";
            string res = MyMethodsLib.GetDietModeFromDbs("ladygoodwill", MyMethodsLib.GetConnectionString());

            Assert.AreEqual(exp, res);
        }
Пример #3
0
        public void SetDietModeDbsFailTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            string exp = "M:";
            string res = MyMethodsLib.SetDietModeDbs("ladygoodwill", "M: Intense", con);

            Assert.AreNotEqual(exp, res);
        }
Пример #4
0
        public void GetDinnerIDFailTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            int    exp = 1;
            int    res = MyMethodsLib.GetDinnerID(1, con);

            Assert.AreNotEqual(exp, res);
        }
Пример #5
0
        public void GetLunchIDTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            int    exp = -1;
            int    res = MyMethodsLib.GetLunchID(1, con);

            Assert.AreEqual(exp, res);
        }
Пример #6
0
        public void GetMealDateFailTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            var    exp = "";
            var    res = MyMethodsLib.GetMealDate(0, con);

            Assert.AreNotEqual(exp, res);
        }
Пример #7
0
        public void GetMealDateTest()
        {
            string   con = MyMethodsLib.GetConnectionString();
            DateTime exp = default(DateTime);
            var      res = MyMethodsLib.GetMealDate(0, con);

            Assert.AreEqual(exp, res);
        }
Пример #8
0
        public void ChangeUserSurNameTest()
        {
            string con   = MyMethodsLib.GetConnectionString();
            bool   check = false;

            MyMethodsLib.ChangeUserSurName("ladygoodwill", "Annannna", con);
            Assert.AreEqual(check, MyMethodsLib.checkForTesting);
        }
Пример #9
0
        public void ChangeEmailTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            bool   exp = false;

            MyMethodsLib.ChangeEmail("ladygoodwill", "anyemail@com", con);
            Assert.AreEqual(exp, MyMethodsLib.checkForTesting);
        }
Пример #10
0
        public void GetMeasurementNoWithTodayDateFailTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            int    exp = 10;
            int    res = MyMethodsLib.GetMeasurementNoWithTodayDate("ladygoodwill", con);

            Assert.AreNotEqual(exp, res);
        }
Пример #11
0
        public void GetEmailFromDbsFailTest()
        {
            string exp = "Not going to happen";
            string con = MyMethodsLib.GetConnectionString();
            string res = MyMethodsLib.GetEmailFromDbs("ladygoodwill", con);

            Assert.AreNotEqual(exp, res);
        }
Пример #12
0
        public void GetCaloriesToConsumeFailTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            int    exp = 0;
            int    res = MyMethodsLib.GetCaloriesToConsume(0, con);

            Assert.AreNotEqual(exp, res);
        }
Пример #13
0
        public void GetBreakfastIDFailTest()
        {
            int    exp = 10;
            string con = MyMethodsLib.GetConnectionString();
            int    res = MyMethodsLib.GetBreakfastID(0, con);

            Assert.AreNotEqual(exp, res);
        }
Пример #14
0
        public void GetWeightInputsTest()
        {
            string        con = MyMethodsLib.GetConnectionString();
            List <string> exp = new List <string>();
            var           res = MyMethodsLib.GetWeightInputs("ladygoodwill", con);

            Assert.AreEqual(exp.Count, res.Count);
        }
Пример #15
0
        public void GetEmailFromDbsTest()
        {
            string exp = "";
            string con = MyMethodsLib.GetConnectionString();
            string res = MyMethodsLib.GetEmailFromDbs("ladygoodwill", con);

            Assert.AreEqual(exp, res);
        }
Пример #16
0
        public void GetHeightFromDbsFailTest()
        {
            int    exp = 100;
            string con = MyMethodsLib.GetConnectionString();
            int    res = MyMethodsLib.GetHeightFromDbs("ladygoodwill", con);

            Assert.AreNotEqual(exp, res);
        }
Пример #17
0
 public void GetConnectionStringExceptionThrownTest()
 {
     try
     {
         string connRes = MyMethodsLib.GetConnectionString();
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #18
0
 public void GetDietModeFromDbsExceptionThrownTest()
 {
     try
     {
         string res = MyMethodsLib.GetDietModeFromDbs("ladygoodwill", MyMethodsLib.GetConnectionString());
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #19
0
 public void GetMeasurementNoWithTodayDateExceptionThrownTest()
 {
     try
     {
         string con = MyMethodsLib.GetConnectionString();
         int    res = MyMethodsLib.GetMeasurementNoWithTodayDate("ladygoodwill", con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #20
0
 public void ChangeEmailExceptionThrownTest()
 {
     try
     {
         string con = MyMethodsLib.GetConnectionString();
         MyMethodsLib.ChangeEmail("ladygoodwill", "anyemail@com", con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #21
0
 public void GetMealDateExceptionThrownTest()
 {
     try
     {
         string con = MyMethodsLib.GetConnectionString();
         var    res = MyMethodsLib.GetMealDate(0, con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #22
0
 public void ChangeUserSurNameExceptionThrownTest()
 {
     try
     {
         string con = MyMethodsLib.GetConnectionString();
         MyMethodsLib.ChangeUserSurName("ladygoodwill", "Abrakadabra", con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #23
0
 public void GetCaloriesToConsumeExceptionThrownTest()
 {
     try
     {
         string con = MyMethodsLib.GetConnectionString();
         int    res = MyMethodsLib.GetCaloriesToConsume(0, con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #24
0
 public void GetDinnerIDExceptionThrownTest()
 {
     try
     {
         string con = MyMethodsLib.GetConnectionString();
         int    res = MyMethodsLib.GetDinnerID(1, con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #25
0
 public void GetWeightInputsExceptionThrownTest()
 {
     try
     {
         string con = MyMethodsLib.GetConnectionString();
         var    res = MyMethodsLib.GetWeightInputs("ladygoodwill", con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #26
0
 public void GetHeightFromDbsExceptionThrownTest()
 {
     try
     {
         string con = MyMethodsLib.GetConnectionString();
         int    res = MyMethodsLib.GetHeightFromDbs("ladygoodwill", con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #27
0
        public void GetDatesOfInputWeightFailTest()
        {
            List <string> emptyList = new List <string>();
            int           exp       = emptyList.Count + 1;
            string        con       = MyMethodsLib.GetConnectionString();
            List <string> listRes   = MyMethodsLib.GetDatesOfInputWeight("ladygoodwill", con);
            int           res       = listRes.Count;

            Assert.AreNotEqual(exp, res);
        }
Пример #28
0
 public void GetDatesOfInputWeightExceptionThrownTest()
 {
     try
     {
         string        con     = MyMethodsLib.GetConnectionString();
         List <string> listRes = MyMethodsLib.GetDatesOfInputWeight("ladygoodwill", con);
         Assert.Fail();
     }
     catch (Exception) { }
 }
Пример #29
0
        public void SetDietModeDbsExceptionThrownTest()
        {
            string exp = "";

            try
            {
                string con = MyMethodsLib.GetConnectionString();
                exp = MyMethodsLib.SetDietModeDbs("ladygoodwill", "M: Intense", con);
                Assert.Fail();
            }
            catch (Exception) { }
        }
Пример #30
0
 public void RecordRecipesToDbsExceptionThrown2Test()
 {
     try
     {
         string     con     = MyMethodsLib.GetConnectionString();
         List <int> example = new List <int>()
         {
             1, 1, 1, 1, 1
         };
         MyMethodsLib.RecordRecipesToDbs(example, 1, con);
         Assert.Fail();
     }
     catch (Exception) { }
 }