lttng: Move createSession parameters into SessionInfo class
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.core.tests / src / org / eclipse / linuxtools / lttng2 / core / tests / control / model / impl / SessionInfoTest.java
index 6a6b164e3be05dc7f0fc4322f0dba544efcb4010..511206999197234a4e557ad3eefba5ce6099d1de 100644 (file)
@@ -81,6 +81,10 @@ public class SessionInfoTest {
         assertEquals("INACTIVE", state.toString());
         assertEquals(0, state.ordinal());
         assertEquals(0, result.getDomains().length);
+        assertFalse(result.isSnapshotSession());
+        assertNull(result.getNetworkUrl());
+        assertNull(result.getControlUrl());
+        assertNull(result.getDataUrl());
     }
 
     /**
@@ -99,6 +103,10 @@ public class SessionInfoTest {
         for (int i = 0; i < orignalDomains.length; i++) {
             assertEquals(orignalDomains[i], resultDomains[i]);
         }
+
+        assertEquals(sessionInfo.getNetworkUrl(), fSessionInfo1.getNetworkUrl());
+        assertEquals(sessionInfo.getControlUrl(), fSessionInfo1.getControlUrl());
+        assertEquals(sessionInfo.getDataUrl(), fSessionInfo1.getDataUrl());
     }
 
     /**
@@ -189,7 +197,7 @@ public class SessionInfoTest {
         String result = fixture.toString();
 
         // add additional test code here
-        assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],Path=,State=INACTIVE,isStreamedTrace=false,Domains=)]", result);
+        assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],Path=,State=INACTIVE,isStreamedTrace=false,isSnapshot=false,Domains=,NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
     }
 
     /**
@@ -200,12 +208,12 @@ public class SessionInfoTest {
         String result = fSessionInfo1.toString();
 
         // add additional test code here
-        assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,snapshotInfo="
+        assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,isSnapshot=false,snapshotInfo="
                 + "[SnapshotInfo([TraceInfo(Name=snapshot-1)],snapshotPath=/home/user/lttng-trace/mysession/,ID=1,isStreamedSnapshot=false)],"
                     + "Domains=[DomainInfo([TraceInfo(Name=test1)],"
                         + "Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),"
                             + "Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])],"
-                + "isKernel=false)])]", result);
+                + "isKernel=false)],NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
     }
 
     /**
@@ -214,17 +222,18 @@ public class SessionInfoTest {
     @Test
     public void testToString_3() {
         SessionInfo info = new SessionInfo((SessionInfo)fSessionInfo1);
+        info.setSnapshot(false);
         info.setSnapshotInfo(null);
         info.setSessionPath("/home/user/lttng-trace/mysession/");
 
         String result = info.toString();
 
         // add additional test code here
-        assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,"
+        assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,isSnapshot=false,"
                     + "Domains=[DomainInfo([TraceInfo(Name=test1)],"
                         + "Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),"
                             + "Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])],"
-                + "isKernel=false)])]", result);
+                + "isKernel=false)],NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
     }
 
     // ------------------------------------------------------------------------
This page took 0.024315 seconds and 5 git commands to generate.