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