continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r480886 - /maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
Date Thu, 30 Nov 2006 10:41:10 GMT
Author: brett
Date: Thu Nov 30 02:41:06 2006
New Revision: 480886

URL: http://svn.apache.org/viewvc?view=rev&rev=480886
Log:
fix tests

Modified:
    maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java

Modified: maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java?view=diff&rev=480886&r1=480885&r2=480886
==============================================================================
--- maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
(original)
+++ maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
Thu Nov 30 02:41:06 2006
@@ -859,25 +859,33 @@
 
     protected static void assertScheduleEquals( Schedule expectedSchedule, Schedule actualSchedule
)
     {
-        assertNotSame( expectedSchedule, actualSchedule );
-        assertEquals( "compare schedule - id", expectedSchedule.getId(), actualSchedule.getId()
);
-        assertEquals( "compare schedule - name", expectedSchedule.getName(), actualSchedule.getName()
);
-        assertEquals( "compare schedule - desc", expectedSchedule.getDescription(), actualSchedule.getDescription()
);
-        assertEquals( "compare schedule - delay", expectedSchedule.getDelay(), actualSchedule.getDelay()
);
-        assertEquals( "compare schedule - cron", expectedSchedule.getCronExpression(),
-                      actualSchedule.getCronExpression() );
-        assertEquals( "compare schedule - active", expectedSchedule.isActive(), actualSchedule.isActive()
);
+        assertEquals( expectedSchedule, actualSchedule );
+        if ( expectedSchedule != null )
+        {
+            assertNotSame( expectedSchedule, actualSchedule );
+            assertEquals( "compare schedule - id", expectedSchedule.getId(), actualSchedule.getId()
);
+            assertEquals( "compare schedule - name", expectedSchedule.getName(), actualSchedule.getName()
);
+            assertEquals( "compare schedule - desc", expectedSchedule.getDescription(), actualSchedule.getDescription()
);
+            assertEquals( "compare schedule - delay", expectedSchedule.getDelay(), actualSchedule.getDelay()
);
+            assertEquals( "compare schedule - cron", expectedSchedule.getCronExpression(),
+                          actualSchedule.getCronExpression() );
+            assertEquals( "compare schedule - active", expectedSchedule.isActive(), actualSchedule.isActive()
);
+        }
     }
 
     protected static void assertProfileEquals( Profile expectedProfile, Profile actualProfile
)
     {
-        assertNotSame( expectedProfile, actualProfile );
-        assertEquals( "compare profile - name", expectedProfile.getName(), actualProfile.getName()
);
-        assertEquals( "compare profile - desc", expectedProfile.getDescription(), actualProfile.getDescription()
);
-        assertEquals( "compare profile - scmMode", expectedProfile.getScmMode(), actualProfile.getScmMode()
);
-        assertEquals( "compare profile - build w/o changes", expectedProfile.isBuildWithoutChanges(),
-                      actualProfile.isBuildWithoutChanges() );
-        assertEquals( "compare profile - active", expectedProfile.isActive(), actualProfile.isActive()
);
+        assertEquals( expectedProfile, actualProfile );
+        if ( expectedProfile != null )
+        {
+            assertNotSame( expectedProfile, actualProfile );
+            assertEquals( "compare profile - name", expectedProfile.getName(), actualProfile.getName()
);
+            assertEquals( "compare profile - desc", expectedProfile.getDescription(), actualProfile.getDescription()
);
+            assertEquals( "compare profile - scmMode", expectedProfile.getScmMode(), actualProfile.getScmMode()
);
+            assertEquals( "compare profile - build w/o changes", expectedProfile.isBuildWithoutChanges(),
+                          actualProfile.isBuildWithoutChanges() );
+            assertEquals( "compare profile - active", expectedProfile.isActive(), actualProfile.isActive()
);
+        }
     }
 
     protected static void assertInstallationEquals( Installation expected, Installation actual
)



Mime
View raw message