Beispiel #1
0
        public static AssetDraft GetAssetDraft()
        {
            var rand        = TestingUtility.RandomInt();
            var assetSource = GetAssetSource();

            var asset = new AssetDraft()
            {
                Key     = $"Asset-Key-{rand}",
                Sources = new List <AssetSource> {
                    assetSource
                },
                Name = new LocalizedString()
                {
                    { "en", $"Asset_Name_{rand}" }
                },
                Description = new LocalizedString()
                {
                    { "en", $"Asset_Description_{rand}" }
                },
                Tags = new List <string> {
                    $"Tag_{rand}_1", $"Tag_{rand}_2"
                }
            };

            return(asset);
        }
        /// <summary>
        /// Return Relative Product Discount
        /// </summary>
        /// <returns></returns>
        public static RelativeProductDiscountValue GetProductDiscountValueAsRelative()
        {
            var productDiscountValue = new RelativeProductDiscountValue()
            {
                Permyriad = TestingUtility.RandomInt(1, 30)
            };

            return(productDiscountValue);
        }
        public static ExternalTaxRateDraft GetExternalTaxRateDraft()
        {
            var externalTaxRateDraft = new ExternalTaxRateDraft
            {
                Amount  = TestingUtility.RandomDouble(),
                Name    = "Test tax",
                Country = "DE"
            };

            return(externalTaxRateDraft);
        }