// Add adds a new run to the provided model fixture
Add adds a new run to the provided model fixture
// Add adds a new run to the provided model fixture
func (f *modelFixture) AddRun(expandSpec bool) *modelTestRun {
	opts := &GenOpts{}
	opts.IncludeValidator = true
	opts.IncludeModel = true
	opts.ValidateSpec = false
	opts.Spec = f.SpecFile
	if err := opts.EnsureDefaults(); err != nil {
		panic(err)
	}
	opts.FlattenOpts.Expand = expandSpec
	opts.FlattenOpts.Minimal = false
	defs := make(map[string]*modelExpectations, 150)
	run := &modelTestRun{
		FixtureOpts: opts,
		Definitions: defs,
	}
	f.Runs = append(f.Runs, run)
	return run
}
func ( f * modelFixture ) AddRun ( expandSpec bool ) * modelTestRun { opts := & GenOpts { } opts . IncludeValidator = true opts . IncludeModel = true opts . ValidateSpec = false opts . Spec = f . SpecFile if err := opts . EnsureDefaults ( ) ; err != nil { panic ( err ) } opts . FlattenOpts . Expand = expandSpec opts . FlattenOpts . Minimal = false defs := make ( map [ string ] * modelExpectations , 150 ) run := & modelTestRun { FixtureOpts : opts , Definitions : defs , } f . Runs = append ( f . Runs , run ) return run }
Add adds a new run to the provided model fixture
Add adds a new run to the provided model fixture
// sets gen options (e.g. flatten vs expand) - full flatten is the default setting for this test (NOT the default CLI option!)