コード例 #1
0
        // this test is not working either
        public async Task GetNftTemplatesShouldBeTwo()
        {
            var getNftTypeRequest = new GetNftTypesSharedRequest();

            GetNftTypesSharedResponse response = await Mediator.Send(getNftTypeRequest);

            response.TotalNftTypes.ShouldBeGreaterThan((uint)2);
        }
コード例 #2
0
            public override async Task <WebThreeState> Handle
            (
                GetNftTypesClientFeaturesAction aGetNftTypesClientRequest,
                CancellationToken aCancellationToken
            )
            {
                _TemplateList = new List <NftTemplate>();

                GetNftTypesSharedResponse aSharedResponse = await HttpClient.GetJsonAsync <GetNftTypesSharedResponse>(GetNftTypesSharedRequest.Route);

                int NumOfTemplates = (int)aSharedResponse.TotalNftTypes;

                for (uint ctr = 1; ctr <= NumOfTemplates; ctr++)
                {
                    string requestUri = GetNftByTypeSharedRequest.RouteFactory((int)ctr);
                    GetNftByTypeSharedResponse templateResponse = await HttpClient.GetJsonAsync <GetNftByTypeSharedResponse>(requestUri);

                    var template = new NftTemplate()
                    {
                        NftId          = ctr,
                        Name           = templateResponse.NftTypeData.Name,
                        Symbol         = templateResponse.NftTypeData.Symbol,
                        MintLimit      = templateResponse.NftTypeData.MintLimit,
                        AttachedTokens = templateResponse.NftTypeData.AttachedTokens
                    };


                    _TemplateList.Add(template);
                }

                WebThreeState.TemplateDataList = _TemplateList;

                WebThreeState.TotalNftTypes = aSharedResponse.TotalNftTypes;

                return(WebThreeState);
            }