func TestDynamicConfiguratonShouldDefault(t *testing.T) { mockConf := new(mocks.Configuration) dc := config.DynamicConfiguration{ Type: "test", Conf: mockConf, } mockConf.On("Default").Return() dc.Default() mockConf.Mock.AssertExpectations(t) }
func TestDynamicConfiguratonShouldValidate(t *testing.T) { assert := assert.New(t) mockConf := new(mocks.Configuration) dc := config.DynamicConfiguration{ Type: "test", Conf: mockConf, } mockConf.On("Validate").Return(nil) err := dc.Validate() assert.Nil(err) mockConf.Mock.AssertExpectations(t) }