Example #1
0
        public void TestInitialise()
        {
            DataAccess.DataAccessFactory.CreateDataPrimer().Refresh();

            MockDispatcher = ActionFactory.CreateDispatcher<IDataModel>(
                MockFeedbackAPI,
                MockAuthenticationAPI,
                MockModelAPI,
                AuthoriseResult: () => null,
                PasswordResetResult: (m) => null,
                DefaultErrorResult: (m) => null);

            // Login and assert success...
            var Credentials = new Login { EmailAddress = "*****@*****.**", Password = "******" };
            LoadedModel = MockDispatcher.Update(
                DataModel: Credentials,
                SuccessResult: m => m,
                InvalidResult: m => null);

            Assert.IsNotNull(LoadedModel);
        }