private async Task <HubActionTester <int, ResourceGroupModel[]> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.ModCategory.GetResourceGroups));
        }
        private async Task <HubActionTester <EmptyRequest, ModifierModel> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.App.GetDefaultModiifer));
        }
        private async Task <HubActionTester <EmptyRequest, AppVersionModel> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.Version.GetCurrentVersion));
        }
Exemplo n.º 4
0
        private async Task <HubActionTester <AddUserModel, int> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.Users.AddUser));
        }
        private async Task <HubActionTester <int, UserModifierCategoryModel[]> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.AppUser.GetUserModCategories));
        }
Exemplo n.º 6
0
        private async Task <HubActionTester <EditUserForm, EmptyActionResult> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.UserMaintenance.EditUser));
        }
Exemplo n.º 7
0
        private async Task <HubActionTester <EmptyRequest, AppUserModel[]> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.Users.GetUsers));
        }
Exemplo n.º 8
0
        private async Task <HubActionTester <UserRoleRequest, EmptyActionResult> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.AppUserMaintenance.UnassignRole));
        }
Exemplo n.º 9
0
        private async Task <HubActionTester <int, WebRedirectResult> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.Apps.RedirectToApp));
        }
Exemplo n.º 10
0
        private async Task <HubActionTester <NewVersionRequest, AppVersionModel> > setup()
        {
            var host     = new HubTestHost();
            var services = await host.Setup();

            return(HubActionTester.Create(services, hubApi => hubApi.AppRegistration.NewVersion));
        }
Exemplo n.º 11
0
        private static async Task addEditUserRole(HubActionTester <EditUserForm, EmptyActionResult> tester, AppUser loggedInUser)
        {
            var app = await tester.HubApp();

            var editUserRole = await app.Role(HubInfo.Roles.EditUser);

            await loggedInUser.AddRole(editUserRole);
        }
Exemplo n.º 12
0
        private async Task <AppUser> addUser(HubActionTester <EditUserForm, EmptyActionResult> tester, string userName)
        {
            var addUserTester = tester.Create(hubApi => hubApi.Users.AddUser);
            var adminUser     = await addUserTester.AdminUser();

            var userID = await addUserTester.Execute(new AddUserModel
            {
                UserName = userName,
                Password = "******"
            }, adminUser);

            var factory = tester.Services.GetService <AppFactory>();
            var user    = await factory.Users().User(new AppUserName(userName));

            return(user);
        }
Exemplo n.º 13
0
 public AppModifierAssertions(HubActionTester <TModel, TResult> tester)
 {
     this.tester = tester;
 }
Exemplo n.º 14
0
 public static AppModifierAssertions <TModel, TResult> Create <TModel, TResult>(HubActionTester <TModel, TResult> tester)
 {
     return(new AppModifierAssertions <TModel, TResult>(tester));
 }