(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestNewLimitsMap(t *testing.T) { |
| 34 | t.Run("float64", func(t *testing.T) { |
| 35 | lm := NewLimitsMap(fakeFloat64Validator) |
| 36 | lm.data["key1"] = 10.6 |
| 37 | require.Len(t, lm.Read(), 1) |
| 38 | }) |
| 39 | |
| 40 | t.Run("int", func(t *testing.T) { |
| 41 | lm := NewLimitsMap(fakeIntValidator) |
| 42 | lm.data["key1"] = 10 |
| 43 | require.Len(t, lm.Read(), 1) |
| 44 | }) |
| 45 | |
| 46 | t.Run("string", func(t *testing.T) { |
| 47 | lm := NewLimitsMap(fakeStringValidator) |
| 48 | lm.data["key1"] = "test" |
| 49 | require.Len(t, lm.Read(), 1) |
| 50 | }) |
| 51 | } |
| 52 | |
| 53 | func TestLimitsMap_IsNil(t *testing.T) { |
| 54 | tc := map[string]struct { |
nothing calls this directly
no test coverage detected