コード例 #1
0
        //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);
        }
コード例 #2
0
        //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);
        }
コード例 #3
0
 public void Arrange()
 {
     _repo     = new Electric_Repo();
     _electric = new Electric("Tesla", "Model 3", "30kWh/100mi");
     _repo.AddElectricToList(_electric);
 }