示例#1
0
func (s *EditorSuite) SetupTest() {
	s.Suite.SetupTest()
	s.liveWritePath = ""
	s.liveWriteError = nil
	s.scriptErrorPath = ""
	s.scriptError = nil
	s.DataFileFixture = wbgo.NewDataFileFixture(s.T())
	s.addSampleFiles()
	s.RpcFixture = wbgo.NewRpcFixture(
		s.T(), "wbrules", "Editor", "wbrules",
		NewEditor(s),
		"List", "Load", "Remove", "Save")
}
示例#2
0
func (s *RuleSuiteBase) SetupTest(waitForRetained bool, ruleFiles ...string) {
	s.CellSuiteBase.SetupTest(waitForRetained)
	s.DataFileFixture = wbgo.NewDataFileFixture(s.T())
	s.FakeTimerFixture = wbgo.NewFakeTimerFixture(s.T(), s.Recorder)
	s.cron = nil
	s.engine = NewESEngine(s.model, s.driverClient)
	s.engine.SetTimerFunc(s.newFakeTimer)
	s.engine.SetCronMaker(func() Cron {
		s.cron = newFakeCron(s.T())
		return s.cron
	})
	s.loadScripts(ruleFiles)
	s.driver.Start()
	if !waitForRetained {
		s.publishSomedev()
	}
}