public void TestChangeUnexistingPhoneMustReturnNumberOfChangedPhones() { var test = new PhonebookRepository(); test.AddPhone("Pesho", new[] { "08895624", "08895625", "08895626" }); int changedPhones = test.ChangePhone("08895629", "08895628"); Assert.AreEqual(0, changedPhones); }
public void TestChangeSinglePhoneMustReturnNumberOfChangedPhones() { var test = new PhonebookRepository(); test.AddPhone("Pesho", new[] { "08895624", "08895625", "08895626" }); int changedPhones = test.ChangePhone("08895624", "08895628"); Assert.AreEqual(1, changedPhones); // Number of phones should stay unchanged Assert.AreEqual(3, test.KeyNumberValueEntryCount); }