testdatagen

package
v0.0.0-...-34c5031 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultContractCode = "TEST"

DefaultContractCode is the default contract code for testing

View Source
const DefaultServiceCode = "STEST"

DefaultServiceCode is the default service code for testing

Variables

View Source
var DateInsideNonPeakRateCycle = time.Date(TestYear, time.October, 2, 0, 0, 0, 0, time.UTC)

DateInsideNonPeakRateCycle is available as a convenient test date inside the NonPeak Rate Cycle

View Source
var DateInsidePeakRateCycle = time.Date(TestYear, time.May, 16, 0, 0, 0, 0, time.UTC)

DateInsidePeakRateCycle is available as a convenient test date inside the Peak Rate Cycle

View Source
var DateInsidePerformancePeriod = time.Date(TestYear, time.May, 16, 0, 0, 0, 0, time.UTC)

DateInsidePerformancePeriod is within the performance period defined by PerformancePeriodStart and PerformancePeriodEnd.

View Source
var DateOutsideNonPeakRateCycle = time.Date(TestYear+1, time.May, 16, 0, 0, 0, 0, time.UTC)

DateOutsideNonPeakRateCycle is available as a convenient test date outside the NonPeak Rate Cycle

View Source
var DateOutsidePeakRateCycle = time.Date(TestYear, time.October, 10, 0, 0, 0, 0, time.UTC)

DateOutsidePeakRateCycle is available as a convenient test date outside the Peak Rate Cycle

View Source
var DateOutsidePerformancePeriod = time.Date(TestYear, time.August, 1, 0, 0, 0, 0, time.UTC)

DateOutsidePerformancePeriod is after the performance period defined by PerformancePeriodStart and PerformancePeriodEnd.

View Source
var DefaultCOS = "D"

DefaultCOS is the default Code of Service for testing.

View Source
var DefaultDepartmentIndicator = "57 - United States Air Force"

DefaultDepartmentIndicator is a code for orders accounting that indicates which branch the orders are for.

View Source
var DefaultDstGBLOC = "HAFC"

DefaultDstGBLOC is the default GBLOC for testing.

View Source
var DefaultDstRegion = "6"

DefaultDstRegion is a default region (US South West) for testing.

View Source
var DefaultMarket = "dHHG"

DefaultMarket is the default market for testing.

View Source
var DefaultServiceArea = "4"

DefaultServiceArea is the default Service Area for testing.

View Source
var DefaultSrcGBLOC = "KKFA"

DefaultSrcGBLOC is the default GBLOC for testing.

View Source
var DefaultSrcRateArea = "US87"

DefaultSrcRateArea is a default rate area (California) for testing.

View Source
var DefaultTransportationAccountingCode = "F8J1"

DefaultTransportationAccountingCode (TAC) is an accounting code used for orders.

View Source
var DefaultZip3 = "902"

DefaultZip3 is the default zip3 for testing

View Source
var NextValidMoveDate = dates.NextValidMoveDate(time.Now(), cal)

NextValidMoveDate is the next valid move date

View Source
var NonPeakRateCycleEnd = time.Date(TestYear+1, time.May, 14, 0, 0, 0, 0, time.UTC)

NonPeakRateCycleEnd is the first instant that the peak rate cycle ends

View Source
var NonPeakRateCycleStart = time.Date(TestYear, time.October, 1, 0, 0, 0, 0, time.UTC)

NonPeakRateCycleStart is the first instant that the peak rate cycle starts

View Source
var OneDay = time.Hour * 24

OneDay creates a 1 day period

View Source
var OneWeek = time.Hour * 168

OneWeek creates a 1 week period

View Source
var PeakRateCycleEnd = time.Date(TestYear, time.September, 30, 0, 0, 0, 0, time.UTC)

PeakRateCycleEnd is the first instant that the peak rate cycle ends

View Source
var PeakRateCycleStart = time.Date(TestYear, time.May, 15, 0, 0, 0, 0, time.UTC)

PeakRateCycleStart is the first instant that the peak rate cycle starts

View Source
var PerformancePeriodEnd = time.Date(TestYear, time.July, 31, 0, 0, 0, 0, time.UTC)

PerformancePeriodEnd is the last day of the first performance period

View Source
var PerformancePeriodStart = time.Date(TestYear, time.May, 15, 0, 0, 0, 0, time.UTC)

PerformancePeriodStart is the first day of the first performance period

View Source
var RateEngineDate = time.Date(TestYear, time.May, 18, 0, 0, 0, 0, time.UTC)

RateEngineDate is a date for the rate engine to use on generation for tests.

View Source
var TestYear = 2018

TestYear is the default year for testing.

Functions

func MakeDefaultElectronicOrder

func MakeDefaultElectronicOrder(db *pop.Connection) models.ElectronicOrder

MakeDefaultElectronicOrder return an ElectronicOrder with default values (including a default ElectronicOrdersRevision)

func MakeElectronicOrder

func MakeElectronicOrder(db *pop.Connection, assertions Assertions) models.ElectronicOrder

MakeElectronicOrder returns a single ElectronicOrder with a single ElectronicOrdersRevision

Types

type Assertions

type Assertions struct {
	ElectronicOrder          models.ElectronicOrder
	ElectronicOrdersRevision models.ElectronicOrdersRevision
}

Assertions defines assertions about what the data contains

Jump to

Keyboard shortcuts

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