public async Task CreateAssetGroup() { AssetGroupDTO createdGroup = await this.CreateTestAssetGroup(); Assert.NotNull(createdGroup); AssetGroupEntity entity = await this.AssetGroupsManager.TryGetAsync(createdGroup.Name) as AssetGroupEntity; entity.ShouldBeEquivalentTo(createdGroup, o => o .ExcludingMissingMembers()); }
public async Task UpdateAssetGroup() { string url = ApiPaths.ASSET_GROUPS_PATH; AssetGroupDTO TestAssetGroupUpdate = await CreateTestAssetGroup(); AssetGroupDTO editGroup = new AssetGroupDTO() { Name = TestAssetGroupUpdate.Name, IsIosDevice = !TestAssetGroupUpdate.IsIosDevice, ClientsCanCashInViaBankCards = TestAssetGroupUpdate.ClientsCanCashInViaBankCards, SwiftDepositEnabled = TestAssetGroupUpdate.SwiftDepositEnabled }; string editParam = JsonUtils.SerializeObject(editGroup); var response = await this.Consumer.ExecuteRequest(url, Helpers.EmptyDictionary, editParam, Method.PUT); Assert.True(response.Status == HttpStatusCode.NoContent); AssetGroupEntity entity = await this.AssetGroupsManager.TryGetAsync(editGroup.Name) as AssetGroupEntity; entity.ShouldBeEquivalentTo(editGroup, o => o .ExcludingMissingMembers()); }