Ejemplo n.º 1
0
        private async Task <Attribute> GetAttributeByKey(IDControllerService idcService, byte[] attributeKey)
        {
            string ethAttributeAddress = await idcService.GetAttributeAsyncCall(attributeKey);

            //Get the attribute and add it to the dict
            Attribute attribute = await _attributeFacade.GetAttributeAsync(ethAttributeAddress);

            return(attribute);
        }
Ejemplo n.º 2
0
        public async Task TestGetAttribute()
        {
            string    address   = (await DeployAttributeAsync()).Address;
            Attribute attribute = await _attributeFacade.GetAttributeAsync(address);

            Assert.AreEqual(attribute.Hash, "I am an attribute hash");
            Assert.AreEqual(attribute.Location, "I am an attribute location");
            Assert.AreEqual(attribute.Description, "attrDescription");
        }