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());
}
/**
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());
}
/**
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);
}
/**
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);
}
/**
@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);
}
// ------------------------------------------------------------------------