Exemplo n.º 1
0
        public void WhenGettingModelsFromDb_GetsModels()
        {
            // Mock
            CarLogic logic = new CarLogic();

            logic.SetRepositoryInterface(this.mockedRepository.Object);

            // Act
            var result = logic.ListModelLogic();

            // Assert
            Assert.That(result.Count(), Is.EqualTo(3));
            Assert.That(result.SingleOrDefault(x => x.name == "406"), Is.Not.Null);
        }