Exemplo n.º 1
0
        public void PlantTypeRepo_Can_Get_Item()
        {
            PlantTypeRepo p = new PlantTypeRepo();

            p.AddItem(new PlantType(1, "Rose", "15", "20", "25", "20"));

            Assert.AreEqual(new PlantType(1, "Rose", "15", "20", "25", "20"), p.RepoCollection[0]);
            Assert.AreEqual(new PlantType(1, "Rose", "15", "20", "25", "20"), p.GetItem(0));
        }
Exemplo n.º 2
0
        public void PlantTypeRepo_Can_Remove_Item_At_Specific_Index()
        {
            PlantTypeRepo p = new PlantTypeRepo();

            p.AddItem(new PlantType(1, "Rose", "15", "20", "25", "20"));

            Assert.IsNotNull(p.RepoCollection[0]);
            p.RemoveItem(0);
            Assert.IsFalse(p.RepoCollection.Contains(new PlantType(1, "Rose", "15", "20", "25", "20")));
        }
Exemplo n.º 3
0
        public void PlantTypeRepo_Can_Get_Properties_From_Item_Using_Methods()
        {
            PlantTypeRepo p = new PlantTypeRepo();

            p.AddItem(new PlantType(1, "Rose", "15", "20", "25", "20"));

            Assert.AreEqual(1, p.GetPlantId(0));
            Assert.AreEqual("Rose", p.GetPlantType(0));
            Assert.AreEqual("15", p.GetPlantPhaseOne(0));
            Assert.AreEqual("20", p.GetPlantPhaseTwo(0));
            Assert.AreEqual("25", p.GetPlantPhaseThree(0));
            Assert.AreEqual("20", p.GetPlantPhaseFour(0));
        }
Exemplo n.º 4
0
        public void PlantTypeRepo_Can_Add_Item()
        {
            PlantTypeRepo p = new PlantTypeRepo();

            p.AddItem(new PlantType(1, "Rose", "15", "20", "25", "20"));
        }