Ejemplo n.º 1
0
        public void AddSubjectDifferentObjectFail()
        {
            ClearRepository();
            SubjectLogic testLogic = new SubjectLogic();
            int          test      = 0;

            testLogic.Add(test);
            int expectedSubjectLength = 0;

            Assert.IsTrue(testLogic.Length() == expectedSubjectLength);
        }
Ejemplo n.º 2
0
        public void AddSubjectFail()
        {
            ClearRepository();
            Subject      newSubject = testSubject();
            SubjectLogic testLogic  = new SubjectLogic();

            testLogic.Add(newSubject);
            Subject anotherSubject = new Subject();

            testLogic.Add(anotherSubject);
            int expectedLength = 1;

            Assert.IsTrue(testLogic.Length() == expectedLength);
        }
Ejemplo n.º 3
0
        public void AddSubjectFailLength()
        {
            ClearRepository();
            Subject      newSubject      = new Subject();
            string       testCode        = "12";
            string       anotherTestCode = "12";
            SubjectLogic testLogic       = new SubjectLogic();

            newSubject.Code = testCode;
            testLogic.Add(newSubject);
            Subject anotherSubject = new Subject();

            anotherSubject.Code = anotherTestCode;
            testLogic.Add(anotherSubject);
            Assert.IsTrue(testLogic.Length() == 2);
        }