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) } }
func init() { kocha.RegisterTransactionType("genmai", &kocha.GenmaiTransaction{}) Register("migration", &migrationGenerator{}) }
func init() { kocha.RegisterTransactionType("genmai", &kocha.GenmaiTransaction{}) }