Beispiel #1
0
        public void MockNoEnviroByInvalidTypeID()
        {
            var repo        = new EnviroRepoMock();
            var foundEnviro = repo.GetByTypeID(999999);

            Assert.IsNull(foundEnviro);
        }
Beispiel #2
0
        public void MockCanGetSingleEnviroByTypeID()
        {
            var repo        = new EnviroRepoMock();
            var foundEnviro = repo.GetByTypeID(2);

            Assert.AreEqual(2, foundEnviro.EnviroID);
            Assert.AreEqual("MockEName2", foundEnviro.EnviroName);
            Assert.AreEqual("MockEnviro.jpg", foundEnviro.EnviroPic);
            Assert.AreEqual(2, foundEnviro.TypeID);
        }
Beispiel #3
0
        public void MockCanGetAllEnviros()
        {
            var repo       = new EnviroRepoMock();
            var enviroList = repo.GetAll();

            Assert.AreEqual(3, enviroList.Count());
            Assert.AreEqual(2, enviroList[1].EnviroID);
            Assert.AreEqual("MockEName1", enviroList[0].EnviroName);
            Assert.AreEqual("MockEnviro.jpg", enviroList[2].EnviroPic);
            Assert.AreEqual(1, enviroList[0].TypeID);
        }