diff --git a/appsdk/configurable.go b/appsdk/configurable.go index 831d3574d..efadccf8c 100644 --- a/appsdk/configurable.go +++ b/appsdk/configurable.go @@ -99,7 +99,7 @@ func (dynamic AppFunctionsSDKConfigurable) TransformToXML() appcontext.AppFuncti return transform.TransformToXML } -// JSONTransform transforms an EdgeX event to JSON. +// TransformToJSON transforms an EdgeX event to JSON. // It will return an error and stop the pipeline if a non-edgex // event is received or if no data is recieved. // This function is a configuration function and returns a function pointer. diff --git a/appsdk/configurable_test.go b/appsdk/configurable_test.go index a7d4bc62b..3ea621fcc 100644 --- a/appsdk/configurable_test.go +++ b/appsdk/configurable_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" ) -func TestConfigurableDeviceNameFilter(t *testing.T) { +func TestConfigurableFilterByDeviceName(t *testing.T) { configurable := AppFunctionsSDKConfigurable{ Sdk: &AppFunctionsSDK{ LoggingClient: lc, @@ -45,15 +45,15 @@ func TestConfigurableDeviceNameFilter(t *testing.T) { params[tt.key] = tt.value trx := configurable.FilterByDeviceName(params) if tt.expectNil { - assert.Nil(t, trx, "return result from DeviceNameFilter should be nil") + assert.Nil(t, trx, "return result from FilterByDeviceName should be nil") } else { - assert.NotNil(t, trx, "return result from DeviceNameFilter should not be nil") + assert.NotNil(t, trx, "return result from FilterByDeviceName should not be nil") } }) } } -func TestConfigurableValueDescriptorFilter(t *testing.T) { +func TestConfigurableFilterByValueDescriptor(t *testing.T) { configurable := AppFunctionsSDKConfigurable{ Sdk: &AppFunctionsSDK{ LoggingClient: lc, @@ -76,26 +76,26 @@ func TestConfigurableValueDescriptorFilter(t *testing.T) { params[tt.key] = tt.value trx := configurable.FilterByValueDescriptor(params) if tt.expectNil { - assert.Nil(t, trx, "return result from ValueDescriptorFilter should be nil") + assert.Nil(t, trx, "return result from FilterByValueDescriptor should be nil") } else { - assert.NotNil(t, trx, "return result from ValueDescriptorFilter should not be nil") + assert.NotNil(t, trx, "return result from FilterByValueDescriptor should not be nil") } }) } } -func TestConfigurableXMLTransform(t *testing.T) { +func TestConfigurableTransformToXML(t *testing.T) { configurable := AppFunctionsSDKConfigurable{} trx := configurable.TransformToXML() - assert.NotNil(t, trx, "return result from XMLTransform should not be nil") + assert.NotNil(t, trx, "return result from TransformToXML should not be nil") } -func TestConfigurableJSONTransform(t *testing.T) { +func TestConfigurableTransformToJSON(t *testing.T) { configurable := AppFunctionsSDKConfigurable{} trx := configurable.TransformToJSON() - assert.NotNil(t, trx, "return result from JSONTransform should not be nil") + assert.NotNil(t, trx, "return result from TransformToJSON should not be nil") } func TestConfigurableHTTPPost(t *testing.T) { diff --git a/examples/simple-filter-xml-mqtt/main.go b/examples/simple-filter-xml-mqtt/main.go index 2ffaa7c59..c378efaca 100644 --- a/examples/simple-filter-xml-mqtt/main.go +++ b/examples/simple-filter-xml-mqtt/main.go @@ -39,7 +39,7 @@ func main() { os.Exit(-1) } - // 2) Since our DeviceNameFilter Function requires the list of device names we would + // 2) Since our FilterByDeviceName Function requires the list of device names we would // like to search for, we'll go ahead and define that now. deviceNames := []string{"Random-Float-Device"} // Since we are using MQTT, we'll also need to set up the addressable model to diff --git a/examples/simple-filter-xml-post/main.go b/examples/simple-filter-xml-post/main.go index 9246dfe45..6bc329cc0 100644 --- a/examples/simple-filter-xml-post/main.go +++ b/examples/simple-filter-xml-post/main.go @@ -37,7 +37,7 @@ func main() { os.Exit(-1) } - // 2) Since our DeviceNameFilter Function requires the list of device names we would + // 2) Since our FilterByDeviceName Function requires the list of device names we would // like to search for, we'll go ahead and define that now. deviceNames := []string{"Random-Float-Device"} // 3) This is our pipeline configuration, the collection of functions to diff --git a/examples/simple-filter-xml/main.go b/examples/simple-filter-xml/main.go index ff609d3d7..3ea002f23 100644 --- a/examples/simple-filter-xml/main.go +++ b/examples/simple-filter-xml/main.go @@ -41,7 +41,7 @@ func main() { os.Exit(-1) } - // 2) Since our DeviceNameFilter Function requires the list of device names we would + // 2) Since our FilterByDeviceName Function requires the list of device names we would // like to search for, we'll go ahead and define that now. deviceNames := []string{"Random-Float-Device"}