Beispiel #1
0
        public async Task VisitsController_Get_Test()
        {
            bool called             = false;
            var  visitRepository    = new Data.Repositories.Fakes.StubIVisitRepository();
            var  employeeRepository = new Data.Repositories.Fakes.StubIEmployeeRepository();

            visitRepository.GetCompleteInfoAsyncInt32PictureType = (id, picture) =>
            {
                called = true;
                return(Task.FromResult(new Visit()));
            };

            var target = new VisitsController(visitRepository, new SecurityHelper(), employeeRepository);
            var result = await target.Get(0, PictureType.Small);

            Assert.IsNotNull(result);
            Assert.IsTrue(called);
        }