(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestConfig_ToJSON(t *testing.T) { |
| 35 | data, err := refConfig.ToJSON() |
| 36 | assert.Nil(t, err) |
| 37 | assert.NotNil(t, data) |
| 38 | |
| 39 | testConfig := &Config{} |
| 40 | err = testConfig.FromJSON(data) |
| 41 | assert.Nil(t, err) |
| 42 | assert.Equal(t, refConfig, testConfig) |
| 43 | } |
| 44 | |
| 45 | func TestConfig_ToJSONWithIndent(t *testing.T) { |
| 46 | data, err := refConfig.ToJSONWithIndent() |