//create public void AddElectricToList_ShouldGetCorrectBoolean() { //Arrange Electric electric = new Electric(); Electric_Repo repo = new Electric_Repo(); //Act bool addResult = repo.AddElectricToList(electric); //Assert Assert.IsTrue(addResult); }
//read public void GetElectricList_ShouldReturnCorrectCollection() { //arrange Electric electric = new Electric(); Electric_Repo repo = new Electric_Repo(); repo.AddElectricToList(electric); //act List <Electric> electricList = repo.GetElectricList(); bool dirHasElectric = electricList.Contains(electric); //assert Assert.IsTrue(dirHasElectric); }
public void Arrange() { _repo = new Electric_Repo(); _electric = new Electric("Tesla", "Model 3", "30kWh/100mi"); _repo.AddElectricToList(_electric); }