From eaf4136c5b5840ebbb01999af28e04aeaa22eea9 Mon Sep 17 00:00:00 2001
From: Floris Berendsen <floris.berendsen@gmail.com>
Date: Wed, 20 Jan 2016 11:06:04 +0100
Subject: [PATCH] ENH: Minor; Renamed itkImageFilterTest and added comments

---
 Testing/Unit/CMakeLists.txt                   |  2 +-
 ...nentTest.cxx => elxitkImageFilterTest.cxx} | 23 ++++++++++++++++---
 2 files changed, 21 insertions(+), 4 deletions(-)
 rename Testing/Unit/{elxProcessObjectComponentTest.cxx => elxitkImageFilterTest.cxx} (79%)

diff --git a/Testing/Unit/CMakeLists.txt b/Testing/Unit/CMakeLists.txt
index bbb61081..93f35c58 100644
--- a/Testing/Unit/CMakeLists.txt
+++ b/Testing/Unit/CMakeLists.txt
@@ -10,7 +10,7 @@ set( ElastixUnitTestFilenames
   elxComponentFactoryTest.cxx
   elxComponentInterfaceTest.cxx
   elxOverlordTest.cxx
-  elxProcessObjectComponentTest.cxx
+  elxitkImageFilterTest.cxx
 )         
 
 # ---------------------------------------------------------------------
diff --git a/Testing/Unit/elxProcessObjectComponentTest.cxx b/Testing/Unit/elxitkImageFilterTest.cxx
similarity index 79%
rename from Testing/Unit/elxProcessObjectComponentTest.cxx
rename to Testing/Unit/elxitkImageFilterTest.cxx
index b4a20f04..d6367582 100644
--- a/Testing/Unit/elxProcessObjectComponentTest.cxx
+++ b/Testing/Unit/elxitkImageFilterTest.cxx
@@ -5,9 +5,19 @@
 
 #include "gtest/gtest.h"
 
+/** this test uses the following blueprint setup
+
+ [SourceComponent] - [itkImageFilter] - [itkImageFilter] - [SinkComponent]
+
+ - All the nodes are identified by their Class names
+ - All Connections are identified by their Interface names
+
+ The overlord finds the Source and Sink Components and connects these to it's external pipeline (internal reader and writer filters, currently).
+*/
+
 namespace selx {
 
-class ProcessObjectTest : public ::testing::Test {
+  class itkImageFilterTest : public ::testing::Test {
 public:
   typedef Overlord::Pointer                 OverlordPointerType;
   typedef Blueprint::Pointer                BlueprintPointerType;
@@ -17,13 +27,17 @@ public:
   typedef Blueprint::ParameterValueType     ParameterValueType;
 
   virtual void SetUp() {
-    /** register all example components */
+
+
+    /** register all components used for this test */
     ComponentFactory<ItkSmoothingRecursiveGaussianImageFilterComponent>::RegisterOneFactory();
     ComponentFactory<ItkImageSinkComponent>::RegisterOneFactory();
     ComponentFactory<ItkImageSourceComponent>::RegisterOneFactory();
 
     /** make example blueprint configuration */
     blueprint = Blueprint::New();
+
+    /** the 2 itkImageFilter Components are ItkSmoothingRecursiveGaussianImageFilterComponent*/ 
     ParameterMapType componentParameters;
     componentParameters["NameOfClass"] = ParameterValueType(1, "ItkSmoothingRecursiveGaussianImageFilterComponent");
 
@@ -38,14 +52,17 @@ public:
     //TODO: check direction
     blueprint->AddConnection(index0, index1, connectionParameters);
 
+    /** Add a description of the SourceComponent*/
     ParameterMapType sourceComponentParameters;
     sourceComponentParameters["NameOfClass"] = ParameterValueType(1, "ItkImageSourceComponent");
     ComponentIndexType sourceIndex = blueprint->AddComponent(sourceComponentParameters);
 
+    /** Add a description of the SinkComponent*/
     ParameterMapType sinkComponentParameters;
     sinkComponentParameters["NameOfClass"] = ParameterValueType(1, "ItkImageSinkComponent");
     ComponentIndexType sinkIndex = blueprint->AddComponent(sinkComponentParameters);
     
+    /** Connect Sink and Source to the itkImageFilter Components*/
     blueprint->AddConnection(sourceIndex,index0, connectionParameters); // 
     blueprint->AddConnection(index1, sinkIndex, connectionParameters);
   }
@@ -58,7 +75,7 @@ public:
   Overlord::Pointer overlord;
 };
 
-TEST_F(ProcessObjectTest, Configure)
+  TEST_F(itkImageFilterTest, Run)
 {
   overlord = Overlord::New();
   overlord->SetBlueprint(blueprint);
-- 
GitLab