public PersonRetreivalServiceTests()
        {
            _personRepo = new Mock_PersonRepository();
            _api        = new TestWebApiContext();

            // add some seed data to the api
            _api.SeedData(nUnit.TestData.PersonTestData.ValidPersonsList);
            _personRetreivalService = new PersonRetreivalService(_personRepo, _api);
        }
        public void GetUE_ShouldReturnWithSameID()
        {
            var context = new TestWebApiContext();

            context.UserEvaluation.Add(GetDefaultUserEval());

            var controller = new UserEvaluationsController(context);
            var result     = controller.GetUserEvaluation(new Guid("07FDE199-1B05-4244-9988-517CF8F3936A")) as OkNegotiatedContentResult <UserEvaluation>;

            Assert.IsNotNull(result);
            Assert.AreEqual(new Guid("07FDE199-1B05-4244-9988-517CF8F3936A"), result.Content.CD_USEREVALUATION);
        }
 public MessagesController(
     MessageDbContext context,
     TestWebApiContext testWebApiContext,
     UserManager <TestWebApiUser> userManager,
     SignInManager <TestWebApiUser> signInManager
     )
 {
     _context           = context;
     _testWebApiContext = testWebApiContext;
     _userManager       = userManager;
     _signInManager     = signInManager;
 }
        public void GetUE_ShouldReturnAll()
        {
            var context = new TestWebApiContext();

            context.UserEvaluation.Add(new UserEvaluation {
                DS_EMAIL = "*****@*****.**", DS_NAME = "Test User 1"
            });
            context.UserEvaluation.Add(new UserEvaluation {
                DS_EMAIL = "*****@*****.**", DS_NAME = "Test User 2"
            });
            context.UserEvaluation.Add(new UserEvaluation {
                DS_EMAIL = "*****@*****.**", DS_NAME = "Test User 3"
            });

            var controller = new UserEvaluationsController(context);
            var result     = controller.GetUserEvaluation() as TestUserEvaluationDbSet;

            Assert.IsNotNull(result);
            Assert.AreEqual(3, result.Local.Count);
        }