dbtesting

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 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) 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