Changes
2 changed files (+57/-0)
-
-
@@ -14,4 +14,29 @@ func TestActivityNew(t *testing.T) {if a.Type != testType { t.Errorf("Activity Type '%v' different than expected '%v'", a.Type, testType) } g := ActivityNew(testValue, "") if g.Id != testValue { t.Errorf("Activity Id '%v' different than expected '%v'", g.Id, testValue) } if g.Type != ActivityType { t.Errorf("Activity Type '%v' different than expected '%v'", g.Type, ActivityType) } } func TestValidActivityType(t *testing.T) { var invalidType string = "RandomType" if ValidActivityType(ActivityType) { t.Errorf("Generic Activity Type '%v' should not be valid", ActivityType) } if ValidActivityType(invalidType) { t.Errorf("Activity Type '%v' should not be valid", invalidType) } for _, validType := range validActivityTypes { if !ValidActivityType(validType) { t.Errorf("Activity Type '%v' should be valid", validType) } } }
-
-
-
@@ -40,3 +40,35 @@ func TestLinkNew(t *testing.T) {t.Errorf("Object Type '%v' different than expected '%v'", l.Type, LinkType) } } func TestValidObjectType(t *testing.T) { var invalidType string = "RandomType" if ValidObjectType(ObjectType) { t.Errorf("Generic Object Type '%v' should not be valid", ObjectType) } if ValidObjectType(invalidType) { t.Errorf("Object Type '%v' should not be valid", invalidType) } for _, validType := range validObjectTypes { if !ValidObjectType(validType) { t.Errorf("Object Type '%v' should be valid", validType) } } } func TestValidLinkType(t *testing.T) { var invalidType string = "RandomType" if ValidLinkType(LinkType) { t.Errorf("Generic Link Type '%v' should not be valid", LinkType) } if ValidLinkType(invalidType) { t.Errorf("Link Type '%v' should not be valid", invalidType) } for _, validType := range validLinkTypes { if !ValidLinkType(validType) { t.Errorf("Link Type '%v' should be valid", validType) } } }
-