Exemplo n.º 1
0
        public void TestEqualDifferentObject()
        {
            Course course = new Course("Chemistry");
            Student student = new Student("Hari", 123);

            course.Equals(student);
        }
Exemplo n.º 2
0
 public void TestEqualNullObject()
 {
     Course course = new Course("Chemistry");
     course.Equals(null);
 }
Exemplo n.º 3
0
        public void TestEqualSameCourses()
        {
            Course course = new Course("Chemistry");
            Course courseMock = new Course("Chemistry");

            Assert.IsTrue(course.Equals(courseMock));
        }
Exemplo n.º 4
0
        public void TestEqualDifferentCourses()
        {
            Course course = new Course("Chemistry");
            Course courseMock = new Course("Making Bread");

            Assert.IsFalse(course.Equals(courseMock));
        }
Exemplo n.º 5
0
        public void Equals_CompareNotEqualCourses()
        {
            Course course = new Course("JSPart1", 10);
            Course otherCourse = new Course("JSPart2", 12);

            Assert.IsFalse(course.Equals(otherCourse));
        }
Exemplo n.º 6
0
        public void Equals_CompareEqualCourses()
        {
            Course course = new Course("css", 10);
            Course otherCourse = new Course("CSS", 12);

            Assert.IsTrue(course.Equals(otherCourse));
        }