Beispiel #1
0
        public void AddActivityFail()
        {
            SetUp();
            Activity newActivity = new Activity();
            int      testId      = 122;

            newActivity.Id = testId;
            ActivityLogic testLogic = new ActivityLogic();

            Assert.IsFalse(testLogic.Exists(newActivity));
        }
Beispiel #2
0
        public void RemoveActivitySuccess()
        {
            SetUp();
            ActivityLogic testLogic  = new ActivityLogic();
            Activity      anActivity = testActivity();

            testLogic.Add(anActivity);
            int id = GetLastActivityInDB().Id;

            anActivity.Id = GetLastActivityInDB().Id;
            testLogic.Remove(anActivity);
            Assert.IsFalse(testLogic.Exists(anActivity));
        }
Beispiel #3
0
        public void AddActivitySuccess()
        {
            SetUp();
            Activity newActivity = new Activity();
            DateTime aDate       = new DateTime(2003, 4, 5, 4, 5, 6);

            newActivity.Date = aDate;
            ActivityLogic testLogic = new ActivityLogic();

            testLogic.Add(newActivity);
            newActivity.Id = GetLastActivityInDB().Id;
            Assert.IsTrue(testLogic.Exists(newActivity));
        }
Beispiel #4
0
        public void ModifyStudentFailCheckOldActivity()
        {
            SetUp();
            ActivityLogic testLogic       = new ActivityLogic();
            Activity      newActivity     = testActivity();
            Activity      anotherActivity = testActivity();

            anotherActivity.Name = "";
            anotherActivity.Cost = -3;
            testLogic.Add(newActivity);
            newActivity.Id = GetLastActivityInDB().Id;
            testLogic.Modify(newActivity, anotherActivity);
            Assert.IsTrue(testLogic.Exists(newActivity));
        }