Пример #1
0
func (s *ManifoldSuite) TestOutputSuccess(c *gc.C) {
	source := leadership.DummyTrackerWorker()
	var target leadership.Tracker
	err := s.manifold.Output(source, &target)
	c.Check(err, jc.ErrorIsNil)
	c.Check(target, gc.Equals, source)
}
Пример #2
0
func (s *ManifoldSuite) TestOutputBadTarget(c *gc.C) {
	var target interface{}
	err := s.manifold.Output(leadership.DummyTrackerWorker(), &target)
	c.Check(target, gc.IsNil)
	c.Check(err.Error(), gc.Equals, "expected *leadership.tracker->*leadership.Tracker; got *leadership.tracker->*interface {}")
}