dbtesting

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package dbtesting is a testing util package for running unit tests against a running database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed struct {
	Data *db.Feed
	// contains filtered or unexported fields
}

type Querier

type Querier struct {
	db.Querier
	// contains filtered or unexported fields
}

func NewQuerier

func NewQuerier(t *testing.T) *Querier

func (*Querier) AssertNilErr

func (q *Querier) AssertNilErr(err error, action string)

func (*Querier) NewSystem

func (q *Querier) NewSystem(id string) System

type Route

type Route struct {
	Data *db.Route
	// contains filtered or unexported fields
}

func (*Route) NewTrip

func (r *Route) NewTrip(id string, stopTimes []StopTime) db.GetTripRow

type StopTime

type StopTime struct {
	Stop      db.Stop
	Departure time.Time
	Arrival   time.Time
}

type System

type System struct {
	Data          *db.System
	DefaultFeed   *Feed
	DefaultAgency *db.Agency
	// contains filtered or unexported fields
}

func (*System) NewAgency

func (s *System) NewAgency(id string) db.Agency

func (*System) NewFeed

func (s *System) NewFeed(id string) Feed

func (*System) NewRoute

func (s *System) NewRoute(id string) Route

func (*System) NewScheduledService added in v0.6.1

func (s *System) NewScheduledService(id string, params ...db.InsertScheduledServiceParams) db.ScheduledService

func (*System) NewScheduledTrip added in v0.6.1

func (s *System) NewScheduledTrip(id string, serviceID string, routeID string, params ...db.InsertScheduledTripParams) db.ScheduledTrip

func (*System) NewStop

func (s *System) NewStop(id string, params ...db.InsertStopParams) db.Stop

Jump to

Keyboard shortcuts

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