1
2
3
4
5
6
7 package org.mule.util;
8
9 import org.mule.tck.junit4.AbstractMuleContextTestCase;
10
11 import org.junit.Test;
12
13 import static org.junit.Assert.assertEquals;
14 import static org.junit.Assert.assertNotNull;
15 import static org.junit.Assert.assertTrue;
16
17 public class SplashScreenTestCase extends AbstractMuleContextTestCase
18 {
19
20 @Test
21 public void testMuleContextSplashScreenRendering() throws Exception
22 {
23 SplashScreen serverStartupSplashScreen = new ServerStartupSplashScreen();
24 assertNotNull(serverStartupSplashScreen);
25 assertTrue(serverStartupSplashScreen.toString().length() > 0);
26
27 muleContext.start();
28 muleContext.stop();
29 String initialStartBoilerPlate = serverStartupSplashScreen.toString();
30
31 muleContext.start();
32 muleContext.stop();
33 String subsequentStartBoilerPlate = serverStartupSplashScreen.toString();
34
35
36 assertEquals("Splash-screen sizes differ, ", initialStartBoilerPlate.length(), subsequentStartBoilerPlate.length());
37 }
38
39 }