Пример #1
0
        public void KgToLooseFailTest()
        {
            double exp = 100;
            var    res = MyMethodsLib.KgToLoose("ladygoodwill", "89");

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

            Assert.AreEqual(exp, res);
        }
Пример #3
0
        public void GetProperWeightCalculationFailTest()
        {
            double exp = 10.0;
            var    res = MyMethodsLib.GetProperWeightCalculation("ladygoodwill");

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

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

            Assert.AreEqual(exp, res);
        }
Пример #6
0
        public void CaloriesIntakeFailTest()
        {
            int exp = 90;
            int res = MyMethodsLib.CaloriesIntake("ladygoodwill");

            Assert.AreNotEqual(exp, res);
        }
Пример #7
0
        public void WeightResultOutput2Test()
        {
            string exp = "0";
            string res = MyMethodsLib.WeightResultOutput("ladygoodwill", 0, "0");

            Assert.AreEqual(exp, res);
        }
Пример #8
0
        public void DaysToAchieveGoalFailTest()
        {
            string exp = "90";
            string res = MyMethodsLib.DaysToAchieveGoal("100", 1.5);

            Assert.AreNotEqual(exp, res);
        }
Пример #9
0
        public void TimeToAchieveGoalFailTest()
        {
            string exp = "100";
            string res = MyMethodsLib.TimeToAchieveGoal("70", 7);

            Assert.AreNotEqual(exp, res);
        }
Пример #10
0
        public void WeightResultOutputFailTest()
        {
            string exp = "101";
            string res = MyMethodsLib.WeightResultOutput("ladygoodwill", 34.0, "100");

            Assert.AreNotEqual(exp, res);
        }
Пример #11
0
        public void DaysToAchieveGoal2Test()
        {
            string exp = "N/A";
            string res = MyMethodsLib.DaysToAchieveGoal("", 0);

            Assert.AreEqual(exp, res);
        }
Пример #12
0
        public void getUsernameFailTest()
        {
            string exp = "lala";
            string res = MyMethodsLib.getUsername("ladygoodwill");

            Assert.AreNotEqual(res, exp);
        }
Пример #13
0
        public void SendMailFailTest()
        {
            bool exp = true;
            bool res = MyMethodsLib.SendMail("This is email", "ladygoodwill");

            Assert.AreNotEqual(exp, res);
        }
Пример #14
0
        public void CalculateBMITest()
        {
            string bmiExp = "28.40818";
            string bmiRes = MyMethodsLib.CalculateBMI("89", "177");

            Assert.AreEqual(bmiExp, bmiRes);
        }
Пример #15
0
        public void CalculateBMIFailTest()
        {
            string bmiExp = "19";
            string bmiRes = MyMethodsLib.CalculateBMI("89", "177");

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

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

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

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

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

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

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

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

            Assert.AreNotEqual(exp, res);
        }
Пример #24
0
        public void GetMeasurementNoWithTodayDateFailTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            int    exp = 10;
            int    res = MyMethodsLib.GetMeasurementNoWithTodayDate("ladygoodwill", con);

            Assert.AreNotEqual(exp, res);
        }
Пример #25
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);
        }
Пример #26
0
        public void GetHeightFromDbsFailTest()
        {
            int    exp = 100;
            string con = MyMethodsLib.GetConnectionString();
            int    res = MyMethodsLib.GetHeightFromDbs("ladygoodwill", con);

            Assert.AreNotEqual(exp, res);
        }
Пример #27
0
        public void ChangeEmailTest()
        {
            string con = MyMethodsLib.GetConnectionString();
            bool   exp = false;

            MyMethodsLib.ChangeEmail("ladygoodwill", "anyemail@com", con);
            Assert.AreEqual(exp, MyMethodsLib.checkForTesting);
        }
Пример #28
0
        public void ChangeUserSurNameTest()
        {
            string con   = MyMethodsLib.GetConnectionString();
            bool   check = false;

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

            Assert.AreEqual(exp, res);
        }
Пример #30
0
 public void SendMailExceptionThrownTest()
 {
     try
     {
         bool res = MyMethodsLib.SendMail("This is email", "ladygoodwill");
         Assert.Fail();
     }
     catch (Exception) { }
 }