コード例 #1
0
 public void Then_the_contact_book_should_contains_all_other_contacts()
 {
     CollectionAssert.AreEquivalent(
         ContactBook.Contacts.ToArray(),
         AddedContacts.Except(RemovedContacts).ToArray(),
         "All contacts that has not been explicitly removed should be still present in contact book");
 }
コード例 #2
0
        private void OnAddContact()
        {
            if (Student.Contacts == null)
            {
                Student.Contacts = new ObservableCollection <Contact>();
            }

            Contact contact = new Contact {
                ContactID = Guid.NewGuid()
            };

            contact.ContactNumber = EditableContact.ContactNumber;
            contact.StudentID     = Student.StudentGuid;

            Student.Contacts.Add(contact);
            AddedContacts.Add(contact);

            EditableContact.ContactNumber = null;
            EditableContact.Contacts      = Student.Contacts;
        }
コード例 #3
0
 public void Then_the_contact_book_should_contains_all_other_contacts()
 {
     Assert.Equal(
         ContactBook.Contacts.ToArray(),
         AddedContacts.Except(RemovedContacts).ToArray());
 }