Пример #1
0
func (s *S) TestCommandsFromBaseManagerAreRegistered(c *check.C) {
	baseManager := cmd.NewManager("megdc", "0.9.1", os.Stdout, os.Stderr, os.Stdin, nil, nil)
	manager := cmdRegistry("megdc")

	for name, instance := range baseManager.Commands {
		command, ok := manager.Commands[name]
		c.Assert(ok, check.Equals, true)
		c.Assert(command, check.FitsTypeOf, instance)
	}

}
Пример #2
0
func (s *S) SetUpTest(c *gocheck.C) {
	var stdout, stderr bytes.Buffer
	manager = cmd.NewManager("cib", version, header, &stdout, &stderr, os.Stdin)
}