package ui import ( "cli-mon/yabl" "testing" "time" ) func TestNewAmqp(t *testing.T) { t.Run("Amqp Test", func(t *testing.T) { client := NewAmqp("amqp://user:password@localhost:5672/") if client == nil { t.Errorf("Can't create client") } client.Start() now := time.Now() event := &yabl.Event{ Field: yabl.FBoardReady, ActionName: yabl.PPuErrors, Object: nil, //unit: 3, Updated: &now, Value: yabl.ERROR, } client.Consume(event) client.Stop() }) }