Exemplo n.º 1
0
        public void TestControllerTestIndex()
        {
            var        mapper = MapperExtensions.CreateMapper();
            var        sut    = new TestController(mapper, new MemoryTestRepository());
            ViewResult res    = (ViewResult)sut.Index(1);

            res.Model.Should().BeOfType <List <TestModel> >();
            if (res.Model is List <TestModel> items)
            {
                items.ForEach(x => x.Completed.Should().BeFalse());
            }
        }
Exemplo n.º 2
0
 public void OneTimeSetUp()
 {
     _mapper = MapperExtensions.CreateMapper(new ContactProfile());
 }