public void ShouldGenerateList() { PersonGroupPersonRequestGenerator .List("default") .Should() .MatchSnapshot(); }
public async override Task OnInitializedAsync() { await base.OnInitializedAsync().ConfigureAwait(false); if (string.IsNullOrWhiteSpace(PersonGroupId)) { Error = "Person group ID not set!"; // Generate generic requests for demo purposes. _getPeopleRequest = PersonGroupPersonRequestGenerator.List("group-id"); _createPersonRequest = PersonGroupPersonRequestGenerator.Create("group-id", "Person's name", "{\"custom\":\"data\"}"); _updatePersonRequest = PersonGroupPersonRequestGenerator.Update("group-id", Guid.Empty.ToString(), "Person's name", "{\"custom\":\"data\"}"); _deletePersonRequest = PersonGroupPersonRequestGenerator.Delete("group-id", Guid.Empty.ToString()); _getGroupTrainStatusRequest = PersonGroupRequestGenerator.CheckTraining("group-id"); _trainRequest = PersonGroupRequestGenerator.Train("group-id"); RefreshRequests(); return; } string groupId = PersonGroupId !; _getPeopleRequest = PersonGroupPersonRequestGenerator.List(groupId); _createPersonRequest = PersonGroupPersonRequestGenerator.Create(groupId, "Person's name", "{\"custom\":\"data\"}"); _updatePersonRequest = PersonGroupPersonRequestGenerator.Update(groupId, Guid.Empty.ToString(), "Person's name", "{\"custom\":\"data\"}"); _deletePersonRequest = PersonGroupPersonRequestGenerator.Delete(groupId, Guid.Empty.ToString()); _getGroupTrainStatusRequest = PersonGroupRequestGenerator.CheckTraining(groupId); _trainRequest = PersonGroupRequestGenerator.Train(groupId); RefreshRequests(); }