lttng: Add snapshot support - LTTng Tools v2.3
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.core.tests / src / org / eclipse / linuxtools / lttng2 / core / tests / control / model / impl / SessionInfoTest.java
index 3a8039c08aac016ab470d3028b5c31fc9334a113..f033772a0dbdeeb8a790a4757d1c712a5b7ec9a3 100644 (file)
@@ -189,7 +189,7 @@ public class SessionInfoTest {
         String result = fixture.toString();
 
         // add additional test code here
-        assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],State=INACTIVE,isStreamedTrace=false,Domains=)]", result);
+        assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],Path=,State=INACTIVE,isStreamedTrace=false,Domains=)]", result);
     }
 
     /**
@@ -200,7 +200,31 @@ public class SessionInfoTest {
         String result = fSessionInfo1.toString();
 
         // add additional test code here
-        assertEquals("[SessionInfo([TraceInfo(Name=session1)],State=ACTIVE,isStreamedTrace=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);
+        assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=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);
+    }
+
+    /**
+     * Run the String toString() method test.
+     */
+    @Test
+    public void testToString_3() {
+        SessionInfo info = new SessionInfo((SessionInfo)fSessionInfo1);
+        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,"
+                    + "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);
     }
 
     // ------------------------------------------------------------------------
This page took 0.02538 seconds and 5 git commands to generate.