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));
        }
Пример #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));
        }
Пример #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));
        }
Пример #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));
        }
Пример #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));
        }
Пример #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));
        }
Пример #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));
        }
Пример #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);
        }
Пример #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);
        }
Пример #13
0
 public AppModifierAssertions(HubActionTester <TModel, TResult> tester)
 {
     this.tester = tester;
 }
Пример #14
0
 public static AppModifierAssertions <TModel, TResult> Create <TModel, TResult>(HubActionTester <TModel, TResult> tester)
 {
     return(new AppModifierAssertions <TModel, TResult>(tester));
 }