public async Task GetMyConversationsUsers() { var authorizedHttpClient = await base.SignIn(Role.User); var dbContext = TestsBase.CreateDbContext(); ApplicationUser destinataryUser = new ApplicationUser() { ApplicationUserStatusId = 1, EmailAddress = "*****@*****.**", FullName = "TST Cnv USER", }; await dbContext.ApplicationUser.AddAsync(destinataryUser); await dbContext.SaveChangesAsync(); var currentUser = dbContext.ApplicationUser.First(); UserClientService userClientService = CreateUserClientService(); await userClientService.SendMessageAsync(new Models.UserMessage.UserMessageModel() { Message = "Test Message", ToApplicationUserId = destinataryUser.ApplicationUserId }); UserMessageClientService userMessageClientService = base.CreateUserMessageClientService(); var result = await userMessageClientService.GetMyConversationsUsersAsync(); Assert.IsNotNull(result); }
public async Task SendMessageTest() { await base.SignIn(Role.User); UserClientService userClientService = base.CreateUserClientService(); await userClientService.SendMessageAsync(new UserMessageModel() { Message = "PRUEBA", ToApplicationUserId = 1 }); }