public UserController(IMembershipServiceApi membershipServiceApi, IRepository repository, IUserSurveyBiz userSurveyBiz, PlaceApi placeApi) { _repository = repository; _placeApi = placeApi; _userSurveyBiz = userSurveyBiz; _membershipServiceApi = membershipServiceApi; }
public async Task EndFixtureTests() { if (TestContext.Parameters.Count == 0) { PlaceApi.DeletePlaces(); AppApi.DeleteApps(); ItemApi.DeleteItems(); } await _mm.InboxHousekeepingAsync(_mm.ClientCxM).ContinueWith(task => _mm.Dispose()); }
public void EndFixtureTests() { if (IsEachFixtureInNewBrowser) { ClosePrimaryBrowser(); } if (TestContext.Parameters.Count == 0) { PlaceApi.DeletePlaces(PlaceType.NoType); } }
public AuthController(IMembershipServiceApi membershipServiceApi, CoreSmtpClient coreSmtpClient, IUserSurveyBiz userSurveyBiz, IRepository repository, PlaceApi placeApi, Captcha captcha, SmsHttpClient smsHttpClient) { _captcha = captcha; _placeApi = placeApi; _repository = repository; _userSurveyBiz = userSurveyBiz; _smsHttpClient = smsHttpClient; _coreSmtpClient = coreSmtpClient; _membershipServiceApi = membershipServiceApi; }
public void EndFixtureTests() { if (IsEachFixtureInNewBrowser) { ClosePrimaryBrowser(); } if (TestContext.Parameters.Count == 0) { PlaceApi.DeletePlaces(); AppApi.DeleteApps(); ItemApi.DeleteItems(); } }
public void EndFixtureTests() { IsUseAllPageReadyChecks = true; // use normal set of page readiness checks if (IsEachFixtureInNewBrowser) { ClosePrimaryBrowser(); } if (TestContext.Parameters.Count == 0) { PlaceApi.DeletePlaces(); AppApi.DeleteApps(); ItemApi.DeleteItems(); } }
public void PlaceTest() { PlaceApi target = new PlaceApi("key"); PlaceCondition condition = new PlaceCondition() { Query = "ATM", Region = "上海" }; try { target.Place(condition); Assert.Fail(); } catch { } }
public void PlaceApiConstructorTest() { PlaceApi target = new PlaceApi("key"); }
public GoogleController(PlaceApi placeApi) { _placeApi = placeApi; }
public CommonController(IConfiguration configuration, PlaceApi placeApi) { _configuration = configuration; _placeApi = placeApi; }
public void RT04172_IbeaconPropertiesCheck() { var guid = Guid.NewGuid().ToString(); var guid2 = Guid.NewGuid().ToString(); CurrentTenant = TenantTitle.nolang; TestStart(); var d1 = PlaceApi.CreateIbeacon(null, null, guid); var d2 = PlaceApi.CreateIbeacon(null, null, guid); var d3 = PlaceApi.CreateIbeacon(null, null, guid); var place = AddPlaceIbeacon(PlaceStatus.Active); EditForm(); OpenDevicesFromPlace(); var originalCollection = new List <string> { $"{d1.Data.Major}/{d1.Data.Minor}", $"{d2.Data.Major}/{d2.Data.Minor}", $"{d3.Data.Major}/{d3.Data.Minor}" }; var currentCollection = GetElementsText(Devices.TableRowTitle); Assert.IsTrue(IsCollectionContainsCollection(currentCollection, originalCollection), @"Devices dialog should have list items: " + string.Join(", ", originalCollection)); var d4Major = RandomNumberWord; var d4Minor = RandomNumberWord; CreateDeviceIbeacon(guid, d4Major, d4Minor); OpenDevicesFromPlace(); originalCollection = new List <string> { $"{d4Major}/{d4Minor}", $"{d1.Data.Major}/{d1.Data.Minor}", $"{d2.Data.Major}/{d2.Data.Minor}", $"{d3.Data.Major}/{d3.Data.Minor}" }; Assert.IsTrue(AreCollectionsEqual(GetElementsText(Devices.TableRowTitle), originalCollection), @"Devices dialog should have devices: " + string.Join(", ", originalCollection)); SetFilterModal(guid); Assert.IsTrue( AreCollectionsEqual(GetElementsText(Devices.TableRowTitle), originalCollection), "Devices dialog should have devices: " + string.Join(", ", originalCollection)); SetFilterModal($@"{d4Major}/"); originalCollection = new List <string> { $"{d4Major}/{d4Minor}" }; Assert.IsTrue(AreCollectionsEqual(GetElementsText(Devices.TableRowTitle), originalCollection), @"Devices dialog should have only device " + string.Join(", ", originalCollection)); Click(string.Format(Devices.TableRowByText, $"{d4Major}/{d4Minor}")); SubmitForm(); EditForm(); OpenDevicesFromPlace(); SetFilterModal(place.Title); Assert.IsTrue(IsElementEquals( string.Format(Devices.TableRowPlaceByTitle, $"{d4Major}/{d4Minor}"), place.Title), $"iBeacon {d4Major}/{d4Minor} assigned to place should have its title {place.Title}"); PressKeys(Keys.Escape); Assert.IsTrue(IsElementNotFoundQuickly(Devices.DevicesDialog), @"Devices dialog should be closed on 'Esc' press"); ClearDevice(); SubmitForm(); EditForm(); OpenDevicesFromPlace(); SetFilterModal(place.Title); Assert.IsTrue(IsElementNotFoundQuickly(Devices.TableRow), $@"Devices dialog should not show any device by filter '{place.Title}'"); SetFilterModal(string.Empty); OpenDevice($"{d1.Data.Major}/{d1.Data.Minor}"); SendText(Devices.Uuid, guid2); var d1Minor = RandomNumberWord; SendText(Devices.Minor, d1Minor); Click(Devices.SubmitButtonDevice); OpenDevicesFromPlace(); SetFilterModal(guid); originalCollection = new List <string> { $"{d2.Data.Major}/{d2.Data.Minor}", $"{d3.Data.Major}/{d3.Data.Minor}", $"{d4Major}/{d4Minor}" }; Assert.IsTrue( AreCollectionsEqual(GetElementsText(Devices.TableRowTitle), originalCollection), @"Devices dialog should have devices with old UUID: " + string.Join(", ", originalCollection)); SetFilterModal(guid2); originalCollection = new List <string> { $"{d1.Data.Major}/{d1Minor}" }; Assert.IsTrue( AreCollectionsEqual(GetElementsText(Devices.TableRowTitle), originalCollection), "Devices dialog should have device: " + string.Join(", ", originalCollection)); SetFilterModal($"{d1.Data.Major}/{d1Minor}"); Assert.IsTrue( AreCollectionsEqual(GetElementsText(Devices.TableRowTitle), originalCollection), "Devices dialog should have device: " + string.Join(", ", originalCollection)); OpenDevice($"{d1.Data.Major}/{d1Minor}"); Click(Devices.DeleteButtonDevice); Click(PlacesPage.DeleteButton); Click(Devices.ShowDeletedButton, true, 5); SetFilterModal(guid2); Assert.IsTrue( AreCollectionsEqual(GetElementsText(Devices.TableRowTitle), originalCollection), @"Devices dialog should have one deleted device: " + string.Join(", ", originalCollection)); OpenDevice($"{d1.Data.Major}/{d1Minor}"); Assert.IsTrue(IsElementFoundQuickly(Devices.UuidReadOnly), "Restore device dialog should be displayed"); Assert.IsTrue(IsElementFoundQuickly(Devices.CancelButtonDevice), "Restore device dialog should have Cancel button"); Assert.IsTrue(IsElementFoundQuickly(Devices.RestoreButtonDevice), "Restore device dialog should have Restore button"); Click(PlacesPage.RestoreButton); Assert.IsTrue( IsElementEquals( string.Format(Devices.TableRowStatusByTitle, $"{d1.Data.Major}/{d1Minor}"), StatusActive), $"iBeacon {d1.Data.Major}/{d1Minor} should be restored and {StatusActive}"); Click(Devices.CancelButton); Click(PageFooter.SubmitButton); }