Documentation ¶
Index ¶
Constants ¶
const DefaultContractCode = "TEST"
DefaultContractCode is the default contract code for testing
const DefaultServiceCode = "STEST"
DefaultServiceCode is the default service code for testing
Variables ¶
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
DateInsidePeakRateCycle is available as a convenient test date inside the Peak Rate Cycle
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.
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
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
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.
var DefaultCOS = "D"
DefaultCOS is the default Code of Service for testing.
var DefaultDepartmentIndicator = "57 - United States Air Force"
DefaultDepartmentIndicator is a code for orders accounting that indicates which branch the orders are for.
var DefaultDstGBLOC = "HAFC"
DefaultDstGBLOC is the default GBLOC for testing.
var DefaultDstRegion = "6"
DefaultDstRegion is a default region (US South West) for testing.
var DefaultMarket = "dHHG"
DefaultMarket is the default market for testing.
var DefaultServiceArea = "4"
DefaultServiceArea is the default Service Area for testing.
var DefaultSrcGBLOC = "KKFA"
DefaultSrcGBLOC is the default GBLOC for testing.
var DefaultSrcRateArea = "US87"
DefaultSrcRateArea is a default rate area (California) for testing.
var DefaultTransportationAccountingCode = "F8J1"
DefaultTransportationAccountingCode (TAC) is an accounting code used for orders.
var DefaultZip3 = "902"
DefaultZip3 is the default zip3 for testing
var NextValidMoveDate = dates.NextValidMoveDate(time.Now(), cal)
NextValidMoveDate is the next valid move date
NonPeakRateCycleEnd is the first instant that the peak rate cycle ends
NonPeakRateCycleStart is the first instant that the peak rate cycle starts
var OneDay = time.Hour * 24
OneDay creates a 1 day period
var OneWeek = time.Hour * 168
OneWeek creates a 1 week period
PeakRateCycleEnd is the first instant that the peak rate cycle ends
PeakRateCycleStart is the first instant that the peak rate cycle starts
PerformancePeriodEnd is the last day of the first performance period
PerformancePeriodStart is the first day of the first performance period
RateEngineDate is a date for the rate engine to use on generation for tests.
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