public async Task CreateAssetIssuer() { AssetIssuerDTO createdIssuer = await this.CreateTestAssetIssuer(); Assert.NotNull(createdIssuer); AssetIssuersEntity entity = await this.AssetIssuersManager.TryGetAsync(createdIssuer.Id) as AssetIssuersEntity; entity.ShouldBeEquivalentTo(createdIssuer, o => o .ExcludingMissingMembers()); }
public async Task UpdateAssetIssuer() { string url = ApiPaths.ISSUERS_BASE_PATH; AssetIssuerDTO TestAssetIssuerUpdate = await CreateTestAssetIssuer(); AssetIssuerDTO editIssuer = new AssetIssuerDTO() { Id = TestAssetIssuerUpdate.Id, IconUrl = TestAssetIssuerUpdate.IconUrl + Helpers.Random.Next(1000, 9999).ToString() + GlobalConstants.AutoTest, Name = TestAssetIssuerUpdate.Name + Helpers.Random.Next(1000, 9999).ToString() + GlobalConstants.AutoTest, }; string editParam = JsonUtils.SerializeObject(editIssuer); var response = await this.Consumer.ExecuteRequest(url, Helpers.EmptyDictionary, editParam, Method.PUT); Assert.True(response.Status == HttpStatusCode.NoContent); AssetIssuersEntity entity = await this.AssetIssuersManager.TryGetAsync(TestAssetIssuerUpdate.Id) as AssetIssuersEntity; entity.ShouldBeEquivalentTo(editIssuer, o => o .ExcludingMissingMembers()); }