Пример #1
0
func assertStateIsClosed(c *gc.C, st *state.State) {
	c.Assert(func() { st.Ping() }, gc.PanicMatches, "Session already closed")
}
Пример #2
0
func assertStateNotClosed(c *gc.C, st *state.State) {
	err := st.Ping()
	c.Assert(err, jc.ErrorIsNil)
}
Пример #3
0
func assertStateIsOpen(c *gc.C, st *state.State) {
	c.Assert(st.Ping(), jc.ErrorIsNil)
}