public void AddToDirectory_ShouldGetCorrectBoolean() { //Arrange C5Emails content = new C5Emails(); C5_Repo repository = new C5_Repo(); //Act bool addResult = repository.AddToList(content); //Assert Assert.IsTrue(addResult); }
public void GetByTitle_ShouldReturnCorrectContent() { //Arrange C5_Repo repo = new C5_Repo(); C5Emails newContent = new C5Emails("Jim", "Istired", "verytired", CustomerType.Past); repo.AddToList(newContent); string id = "Jim"; //Act C5Emails searchResult = repo.GetCustomerByID(id); //Assert Assert.AreEqual(searchResult.ID, id); }
private void SeedContent() { C5Emails One = new C5Emails( "A1", "James", "Gulley", CustomerType.Potential ); C5Emails Two = new C5Emails( "A2", "Jim", "Gulley", CustomerType.Potential ); C5Emails Three = new C5Emails( "A3", "Jimmy", "Brain", CustomerType.Current ); C5Emails Four = new C5Emails( "A4", "Jimbob", "Gollmister", CustomerType.Current ); C5Emails Five = new C5Emails( "A5", "JimmyBoBob", "Brain", CustomerType.Past ); C5Emails Six = new C5Emails( "A6", "Pinky", "Snarf", CustomerType.Past ); repo.AddToList(One); repo.AddToList(Two); repo.AddToList(Three); repo.AddToList(Four); repo.AddToList(Five); repo.AddToList(Six); }
public void DeleteExistingContent_ShouldReturnTrue() { //Arrange C5_Repo repo = new C5_Repo(); C5Emails content = new C5Emails("Jim", "Istired", "verytired", CustomerType.Past); repo.AddToList(content); //Act C5Emails oldContent = repo.GetCustomerByID("Jim"); bool removeResult = repo.DeleteExisting(oldContent); //Assert Assert.IsTrue(removeResult); }
public void UpdateExistingContent_ShouldReturnTrue() { //Arrange C5_Repo repo = new C5_Repo(); C5Emails oldContent = new C5Emails("Jim", "Istired", "verytired", CustomerType.Past); repo.AddToList(oldContent); C5Emails newContent = new C5Emails("James", "Is", "verytired", CustomerType.Past); //Act bool updateResult = repo.UpdateExistingCustomer(oldContent.ID, newContent); //Assert Assert.IsTrue(updateResult); }
public void GetDirectory_ShouldReturnCorrectCollection() { //Arrange C5Emails content = new C5Emails(); C5_Repo repo = new C5_Repo(); repo.AddToList(content); //Act List <C5Emails> contents = repo.GetCustomers(); bool directoryHasContent = contents.Contains(content); //Assert Assert.IsTrue(directoryHasContent); }