Пример #1
0
        public async Task Should_Fetch_NftTypes()
        {
            var fetchNftTypes = new GetNftTypesClientFeaturesAction();

            WebThreeState response = await Mediator.Send(fetchNftTypes);

            response.TotalNftTypes.ShouldBeGreaterThan((uint)2);
        }
Пример #2
0
        public async Task ClientActionTest()
        {
            var Action = new GetNftTypesClientFeaturesAction();

            WebThreeState ActionResponse = await Mediator.Send(Action);

            ActionResponse.ShouldNotBe(null);
            ActionResponse.TotalNftTypes.ShouldBeGreaterThan((uint)2);
        }
Пример #3
0
        public async Task Should_Generate_NftTypesListWithIds()
        {
            var NftTypeList = new List <NftTemplate>();


            var fetchNftTypes = new GetNftTypesClientFeaturesAction();

            WebThreeState response = await Mediator.Send(fetchNftTypes);

            int NumOfTemplates = (int)response.TotalNftTypes;

            // Nft templates are not zero indexed.
            for (uint ctr = 1; ctr <= NumOfTemplates; ctr++)
            {
                string requestUri = GetNftByTypeSharedRequest.RouteFactory((int)ctr);

                GetNftByTypeSharedResponse templateResponse = await HttpClient.GetJsonAsync <GetNftByTypeSharedResponse>(requestUri);

                templateResponse.NftTypeData.ShouldBeOfType <NftTemplate>();
                var template = new NftTemplate()
                {
                    NftId          = ctr,
                    Name           = templateResponse.NftTypeData.Name,
                    Symbol         = templateResponse.NftTypeData.Symbol,
                    MintLimit      = templateResponse.NftTypeData.MintLimit,
                    AttachedTokens = templateResponse.NftTypeData.AttachedTokens
                };
                NftTypeList.Add(template);
                //  NftTypeDict[ctr] = templateResponse;
                //
            }

            NftTypeList[3].NftId.ShouldBe((uint)4);

            //NftTypeList[3].Name.ShouldBe("TesterTemplate_0");
            //NftTypeDict[4].Name.ShouldBe("TesterTemplate_0");
        }