Example #1
0
func TestRegisterTransactionType(t *testing.T) {
	bakTxTypeMap := kocha.TxTypeMap
	defer func() {
		kocha.TxTypeMap = bakTxTypeMap
	}()
	tx := &testTransaction{}
	kocha.RegisterTransactionType("testtx", tx)
	actual := kocha.TxTypeMap["testtx"]
	expected := tx
	if !reflect.DeepEqual(actual, expected) {
		t.Errorf("RegisterTransactionType(%q, %q) => %q, want %q", "testtx", tx, actual, expected)
	}
}
Example #2
0
func init() {
	kocha.RegisterTransactionType("genmai", &kocha.GenmaiTransaction{})
	Register("migration", &migrationGenerator{})
}
Example #3
0
func init() {
	kocha.RegisterTransactionType("genmai", &kocha.GenmaiTransaction{})
}