Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 4 package com.tc.config.schema; 5 6 import org.apache.xmlbeans.XmlObject; 7 8 import com.terracottatech.config.Client; 9 import com.terracottatech.config.TcConfigDocument.TcConfig; 10 11 import java.io.File ; 12 13 16 public class NewCommonL1ConfigObjectTest extends ConfigObjectTestBase { 17 18 private NewCommonL1ConfigObject object; 19 20 public void setUp() throws Exception { 21 super.setUp(Client.class); 22 this.object = new NewCommonL1ConfigObject(context()); 23 } 24 25 protected XmlObject getBeanFromTcConfig(TcConfig config) throws Exception { 26 return config.getClients(); 27 } 28 29 public void testConstruction() throws Exception { 30 try { 31 new NewCommonL1ConfigObject(null); 32 fail("Didn't get NPE on no context"); 33 } catch (NullPointerException npe) { 34 } 36 } 37 38 public void testLogsPath() throws Exception { 39 addListeners(object.logsPath()); 40 41 String theString = object.logsPath().getFile().toString(); 42 assertTrue(theString.startsWith("logs-")); 43 checkNoListener(); 44 45 builder().getClient().setLogs("foobar"); 46 setConfig(); 47 assertEquals(new File ("foobar"), object.logsPath().getFile()); 48 checkListener(new File (theString), new File ("foobar")); 49 } 50 51 } 52
| Popular Tags
|