testutils

package
v0.0.0-...-bb92df6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2021 License: OSL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAlternativeDeliveryWithAlternativeDiscounts

func BuildAlternativeDeliveryWithAlternativeDiscounts(t *testing.T) *cart.Delivery

BuildAlternativeDeliveryWithAlternativeDiscounts helper for delivery building Adds an item with alternative discount twice This means when discounts are summed up (based on type + delivery) The amount should be added to the previous discount

func BuildDeliveryWithDifferentDiscounts

func BuildDeliveryWithDifferentDiscounts(t *testing.T) *cart.Delivery

BuildDeliveryWithDifferentDiscounts helper for delivery building Adds an item with alternative discount twice This means when discounts are summed up (based on type + delivery) The amount should be added to the previous discount

func BuildDeliveryWithDifferentDiscountsAndShippingDiscounts

func BuildDeliveryWithDifferentDiscountsAndShippingDiscounts(t *testing.T) *cart.Delivery

BuildDeliveryWithDifferentDiscountsAndShippingDiscounts helper for delivery building Adds an item with alternative discount twice Adds a shipping item with discounts This means when discounts are summed up (based on type + delivery) The amount should be added to the previous discount

func BuildDeliveryWithDiscounts

func BuildDeliveryWithDiscounts(t *testing.T) *cart.Delivery

BuildDeliveryWithDiscounts helper for delivery building Adds an item with discount twice This means when discounts are summed up (based on type + delivery) The amount should be added to the previous discount

func BuildDeliveryWithDuplicateDiscounts

func BuildDeliveryWithDuplicateDiscounts(t *testing.T) *cart.Delivery

BuildDeliveryWithDuplicateDiscounts helper for delivery building Adds an item with alternative discount twice This means when discounts are summed up (based on type + delivery) The amount should be added to the previous discount

func BuildDeliveryWithDuplicateDiscountsAndShippingDiscounts

func BuildDeliveryWithDuplicateDiscountsAndShippingDiscounts(t *testing.T) *cart.Delivery

BuildDeliveryWithDuplicateDiscountsAndShippingDiscounts helper for delivery building Adds an item with duplicate discounts Adds a shipping item with discounts This means when discounts are summed up (based on type + delivery) The amount should be added to the previous discount

func BuildDeliveryWithoutDiscounts

func BuildDeliveryWithoutDiscounts(t *testing.T) *cart.Delivery

BuildDeliveryWithoutDiscounts helper for delivery building

func BuildDeliveryWithoutDiscountsAndShippingDiscounts

func BuildDeliveryWithoutDiscountsAndShippingDiscounts(t *testing.T) *cart.Delivery

BuildDeliveryWithoutDiscountsAndShippingDiscounts helper for delivery building

func BuildDeliveryWithoutItemsButWithShippingDiscounts

func BuildDeliveryWithoutItemsButWithShippingDiscounts(t *testing.T) *cart.Delivery

BuildDeliveryWithoutItemsButWithShippingDiscounts helper for delivery building

func BuildItemWithAlternativeDiscounts

func BuildItemWithAlternativeDiscounts(t *testing.T) *cart.Item

BuildItemWithAlternativeDiscounts helper for item building with different discounts

func BuildItemWithDiscounts

func BuildItemWithDiscounts(t *testing.T) *cart.Item

BuildItemWithDiscounts helper for item building

func BuildItemWithDuplicateDiscounts

func BuildItemWithDuplicateDiscounts(t *testing.T) *cart.Item

BuildItemWithDuplicateDiscounts helper for item building with duplicate discounts

func BuildShippingItemWithAlternativeDiscounts

func BuildShippingItemWithAlternativeDiscounts(t *testing.T) *cart.ShippingItem

BuildShippingItemWithAlternativeDiscounts helper for shipping item building with different discounts

func BuildShippingItemWithDiscounts

func BuildShippingItemWithDiscounts(t *testing.T) *cart.ShippingItem

BuildShippingItemWithDiscounts helper for shipping item building

func BuildShippingItemWithDuplicateDiscounts

func BuildShippingItemWithDuplicateDiscounts(t *testing.T) *cart.ShippingItem

BuildShippingItemWithDuplicateDiscounts helper for shipping item building with duplicate discounts

Types

type ByCode

type ByCode cart.AppliedDiscounts

ByCode implements sort.Interface for []AppliedDiscount based on code

func (ByCode) Len

func (a ByCode) Len() int

func (ByCode) Less

func (a ByCode) Less(i, j int) bool

func (ByCode) Swap

func (a ByCode) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL