Author: kkolinko
Date: Thu Jan 21 17:32:49 2016
New Revision: 1726035

URL: http://svn.apache.org/viewvc?rev=1726035&view=rev
Log:
Comments and additional tests. Followup to r1726031.

Modified:
    tomcat/tc6.0.x/trunk/test/org/apache/catalina/TestServerFactory.java

Modified: tomcat/tc6.0.x/trunk/test/org/apache/catalina/TestServerFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/TestServerFactory.java?rev=1726035&r1=1726034&r2=1726035&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/test/org/apache/catalina/TestServerFactory.java 
(original)
+++ tomcat/tc6.0.x/trunk/test/org/apache/catalina/TestServerFactory.java Thu 
Jan 21 17:32:49 2016
@@ -34,13 +34,19 @@ public class TestServerFactory {
 
     @Test
     public void test1() {
+        // Assert initial state of the test
         assertNull(ServerFactory.getServer(false));
+
+        // Assert that ServerFactory.getServer() creates a server
         assertTrue(ServerFactory.getServer() instanceof StandardServer);
 
         ServerFactory.clear();
         assertNull(ServerFactory.getServer(false));
 
+        // Assert that StandardServer() constructor called setServer()
         Server s = new StandardServer();
+        assertEquals(s, ServerFactory.getServer(false));
+
         assertEquals(s, ServerFactory.getServer());
         assertEquals(s, ServerFactory.getServer(true));
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to