public void IsContactConsistent_ReturnsTrue_IfRepositoryOwnerIsSetAndContactOwnerIsNotSet() { var repository = new PhoneBookRepository(_soundexFilter) { ConnectionString = _connectionString }; repository.SetOwnerGuid(_guid); var newContact = new Contact(); var result = repository.IsContactConsistent(newContact); Assert.True(result); }
public void IsContactConsistent_ReturnsFalse_IfRepositoryOwnerAndContactOwnerAreNotConsistent() { var repository = new PhoneBookRepository(_soundexFilter) { ConnectionString = _connectionString }; repository.SetOwnerGuid(_guid); var newContact = new Contact() {Owner = Guid.NewGuid()}; var result = repository.IsContactConsistent(newContact); Assert.False(result); }