public async Task <GetNftByTypeSharedResponse> Handle
        (
            GetNftByTypeSharedRequest aGetNftByTypeSharedRequest,
            CancellationToken aCancellationToken
        )
        {
            var aNftRequest = new GetNftByTypeServiceRequest {
                GetNftId = aGetNftByTypeSharedRequest.GetNftId
            };

            GetNftByTypeServiceResponse response = await Mediator.Send(aNftRequest);

            var nftDto = new NftTemplate()
            {
                Name           = response.Name,
                Symbol         = response.Symbol,
                AttachedTokens = response.AttachedTokens,
                MintLimit      = response.MintLimit
            };

            return(new GetNftByTypeSharedResponse(new System.Guid())
            {
                NftTypeDto = nftDto
            });
        }
Example #2
0
        public async Task ShouldGetTotalNftTemplateTypes()
        {
            // Arrange
            var getNftRequest = new GetNftByTypeServiceRequest {
                GetNftId = 4
            };

            // Act
            GetNftByTypeServiceResponse response = await Mediator.Send(getNftRequest);

            //Assert
            response.Name.ShouldBeOfType <string>();
        }
Example #3
0
        public async Task <GetNftByTypeSharedResponse> Handle
        (
            GetNftByTypeSharedRequest aGetNftByTypeSharedRequest,
            CancellationToken aCancellationToken
        )
        {
            var aNftRequest = new GetNftByTypeServiceRequest {
                GetNftId = aGetNftByTypeSharedRequest.GetNftType
            };

            GetNftByTypeServiceResponse response = await Mediator.Send(aNftRequest);

            return(new GetNftByTypeSharedResponse(new System.Guid())
            {
                NftTypeData = response.NftTypeData
            });
        }