Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #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));
        }