public async Task assignRoleToUser() { var roleName = Util.Methods._makeString(); var role = new CB.CloudRole(roleName); role.Set("name", roleName); var obj = new CB.CloudUser(); obj.Set("username", username); obj.Set("password", password); await obj.Login(); await role.SaveAsync(); await obj.AddToRole(role); Assert.IsTrue(true); }
public async Task AssignRoleToUser() { var roleName = Util.Methods.MakeString(); var role = new CB.CloudRole(roleName); role.Set("name", roleName); var obj = new CB.CloudUser(); obj.Set("username", CB.Test.Util.Methods.MakeEmail()); obj.Set("password", CB.Test.Util.Methods.MakeEmail()); obj.Set("email", CB.Test.Util.Methods.MakeEmail()); await obj.SignupAsync(); await role.SaveAsync(); await obj.AddToRoleAsync(role); Assert.IsTrue(true); }