コード例 #1
0
ファイル: UserTestSuite.cs プロジェクト: Benngard/Halso-Hub
        public void TestCompleteActivityWithTimeLeft()
        {
            string UserName = "******";
            User User = new User(UserName);
            List<MoodType> CuresMoods = new List<MoodType>();
            CuresMoods.Add(MoodType.Sad);
            Activity Activity = new Activity("test", "Check this out", 8, 3, CuresMoods);
            CurrentActivity CurrentActivity = new CurrentActivity(Activity);

            List<Trophy> TrophyList = User.CompleteActivity(CurrentActivity, ActivityGrade.Good, "Need more time");

            Assert.AreEqual(0, TrophyList.Count);
        }
コード例 #2
0
ファイル: UserTestSuite.cs プロジェクト: Benngard/Halso-Hub
        public void TestTotalPoints()
        {
            string UserName = "******";
            User User = new User(UserName);
            User.AddMood(MoodType.Sad);
            List<MoodType> CuresMoods = new List<MoodType>();
            CuresMoods.Add(MoodType.Sad);
            Activity Activity = new Activity("test", "Check this out", 8, 0, CuresMoods);
            CurrentActivity CurrentActivity = new CurrentActivity(Activity);

            List<Trophy> TrophyList = User.CompleteActivity(CurrentActivity, ActivityGrade.Good, "Need more time");
            Assert.AreEqual(8, User.TotalPoints());
        }
コード例 #3
0
ファイル: UserTestSuite.cs プロジェクト: Benngard/Halso-Hub
        public void TestCompleteActivityWithNullParameter() {
            string UserName = "******";
            User User = new User(UserName);
            CurrentActivity Activity = null;

            Assert.AreEqual(0, User.CompleteActivity(Activity, ActivityGrade.Good, "I just broke the system, haha").Count);
        }