public void GetUsersFromTable_Test() { LoginAsHostAdmin(); var table = _userAppService.GetUsersForTable(FakeRequestHelper.CreateDataTablesFakeRequestModel()); table.ShouldNotBe(null); table.data.ShouldNotBe(null); table.data.Count().ShouldBe(1); table.data.ShouldBeAssignableTo <Array>(); }
public async Task UpdateLanguageFromXml_Test() { LoginAsHostAdmin(); await CreateFakeLang(); await UsingDbContextAsync(async dbContext => { var lang = await GetFakeLang(dbContext); lang.ShouldNotBeNull(); lang.Name.ShouldBe("es"); await _languageAppService.UpdateLanguageFromXml(lang.Name, "AbpModuleZero"); var fakeRequest = FakeRequestHelper <LanguageTextsForEditRequest> .CreateDataTablesFakeRequestModel(""); var languageTexts = _languageAppService.GetLocalizationTexts(fakeRequest); languageTexts.ShouldNotBeNull(); languageTexts.data.ShouldNotBeNull(); languageTexts.data.Length.ShouldBeGreaterThan(0); }); }