예제 #1
0
        public void CanGetColorById()
        {
            ColorRepositoryMock repo = new ColorRepositoryMock();

            Color Color = repo.GetAll().FirstOrDefault(c => c.ColorId == 3);

            Assert.AreEqual(Color.ColorId, 3);
            Assert.AreEqual(Color.ColorName, "Gray");
        }
예제 #2
0
        public void CanGetAllColors()
        {
            ColorRepositoryMock repo = new ColorRepositoryMock();

            List <Color> Colors = repo.GetAll().ToList();

            Assert.AreEqual(5, Colors.Count);

            Assert.AreEqual(Colors[2].ColorId, 3);
            Assert.AreEqual(Colors[2].ColorName, "Gray");
        }