TestSpec_PublicAPI_String validates the documented String() format: "ObjectiveMapping{labels: N, logic: X, priorities: M}".
(t *testing.T)
| 238 | // TestSpec_PublicAPI_String validates the documented String() format: |
| 239 | // "ObjectiveMapping{labels: N, logic: X, priorities: M}". |
| 240 | func TestSpec_PublicAPI_String(t *testing.T) { |
| 241 | om := &github.ObjectiveMapping{ |
| 242 | LabelToValue: map[string]int{"bug": 60, "documentation": 5}, |
| 243 | MultiLabelLogic: github.MultiLabelLogicSum, |
| 244 | PriorityLabels: []string{"bug"}, |
| 245 | } |
| 246 | |
| 247 | got := om.String() |
| 248 | assert.Equal(t, "ObjectiveMapping{labels: 2, logic: sum, priorities: 1}", got, |
| 249 | "String() should follow the documented format") |
| 250 | } |
| 251 | |
| 252 | // TestSpec_Functions_DefaultObjectiveMapping validates that |
| 253 | // DefaultObjectiveMapping returns the built-in default mapping. The README |