public void CompareToTestReturns1() { PhoneContact phoneContact1 = new PhoneContact("natalia", "12345"); PhoneContact phoneContact2 = new PhoneContact("anna", "8654569"); int actual = phoneContact1.CompareTo(phoneContact2); Assert.AreEqual(actual, 1); }
public void PhoneComparator() { PhoneContact contact1 = new PhoneContact("Oleg", 22345); PhoneContact contact2 = new PhoneContact("Wasyl", 12345); int expected = 1; int result = contact1.CompareTo(contact2); Assert.AreEqual(expected, result); }
public void CompareToTestReturns0() { const string name = "natalia"; const string phone = "251352"; PhoneContact phoneContact1 = new PhoneContact(name, phone); PhoneContact phoneContact2 = new PhoneContact(name, phone); int actual = phoneContact1.CompareTo(phoneContact2); Assert.AreEqual(actual, 0); }