public async Task VisitorsController_Add_Test()
        {
            bool called            = false;
            var  visitorRepository = new Data.Repositories.Fakes.StubIVisitorRepository();

            var newVisitor = new Visitor()
            {
                VisitorId = 1,
            };

            visitorRepository.AddAsyncVisitor = (visitor) =>
            {
                Assert.IsTrue(visitor.VisitorId == newVisitor.VisitorId);
                called = true;
                return(Task.FromResult(10));
            };

            var target = new VisitorsController(visitorRepository);
            await target.Add(newVisitor);

            Assert.IsTrue(called);
        }
 public async Task VisitorsController_Add_Failed_Test()
 {
     var visitorRepository = new Data.Repositories.Fakes.StubIVisitorRepository();
     var target            = new VisitorsController(visitorRepository);
     await target.Add(null);
 }