public async override Task TestAddGetOwnedAttributeAsync() { byte[] key = Byte32Encoder.Encode("key"); string transactionHash = await IDController.AddAttributeAsync(AddressFrom, key, OwnedAttribute.GetAddress(), new HexBigInteger(3905820)); Assert.NotNull(transactionHash); string attributeAddress = await IDController.GetAttributeAsyncCall(key); Assert.NotNull(attributeAddress); Assert.AreEqual(OwnedAttribute.GetAddress(), attributeAddress); }
public async override Task TestRemoveAttributeAsync() { //Add the attribute to the contract, and get it await TestAddGetOwnedAttributeAsync(); //Remove the attribute byte[] key = Byte32Encoder.Encode("key"); string tansactionHash = await IDController.RemoveAttributeAsync(AddressFrom, key, new HexBigInteger(3905820)); string attributeAddress = await IDController.GetAttributeAsyncCall(key); Assert.AreEqual("0x0000000000000000000000000000000000000000", attributeAddress); }