예제 #1
0
파일: EqualsTest.cs 프로젝트: TRSASC/Lab6
        public void DifNumsTest()
        {
            PhoneCall call1 = new PhoneCall("123", true, cont1);
            PhoneCall call2 = new PhoneCall("444", true, cont1);

            bool res = call1.Equals(call2);

            Assert.IsFalse(res);
        }
예제 #2
0
파일: EqualsTest.cs 프로젝트: TRSASC/Lab6
        public void EqualCallsTest()
        {
            PhoneCall call1 = new PhoneCall("123", true, cont1);
            PhoneCall call2 = new PhoneCall("123", true, cont1);

            bool res = call1.Equals(call2);

            Assert.IsTrue(res);
        }
예제 #3
0
        public void CallsIEquatableEquals()
        {
            IEquatable <PhoneCall> firstCall = new PhoneCall()
            {
                From = "AAAA", To = "BBBB", Caller = null, Direction = CallDirection.Incoming, Duration = 120, StartTime = new DateTime(2000, 10, 5, 10, 20, 20, 300)
            };
            var lastCall = new PhoneCall()
            {
                From = "AAAA", To = "BBBB", Caller = null, Direction = CallDirection.Incoming, Duration = 100, StartTime = new DateTime(2000, 10, 5, 10, 20, 19, 700)
            };


            Assert.IsTrue(firstCall.Equals(lastCall));
        }