use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestGCModelLoader method loadExistingFile.
@Test
public void loadExistingFile() throws Exception {
GCResource gcResource = new GcResourceFile(UnittestHelper.getResourceAsString(UnittestHelper.FOLDER_OPENJDK, "SampleSun1_6_0CMS.txt"));
GCModelLoaderImpl loader = new GCModelLoaderImpl(gcResource);
loader.execute();
GCModel model = loader.get();
assertThat("model", model, notNullValue());
assertThat("model.size", model.size(), not(0));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestGCModelLoaderController method getGcResourcesForSeries.
private ArrayList<GCResource> getGcResourcesForSeries() throws IOException {
ArrayList<GCResource> gcResourceList = new ArrayList<>();
gcResourceList.add(new GcResourceFile(UnittestHelper.getResource(UnittestHelper.FOLDER_OPENJDK, "SampleSun1_8_0Series-Part1.txt").getPath()));
gcResourceList.add(new GcResourceFile(UnittestHelper.getResource(UnittestHelper.FOLDER_OPENJDK, "SampleSun1_8_0Series-Part2.txt").getPath()));
gcResourceList.add(new GcResourceFile(UnittestHelper.getResource(UnittestHelper.FOLDER_OPENJDK, "SampleSun1_8_0Series-Part3.txt").getPath()));
return gcResourceList;
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GCModelLoaderFactoryTest method createFor_GcResourceUnknown.
@Test
public void createFor_GcResourceUnknown() throws Exception {
expectedException.expect(IllegalArgumentException.class);
GCResource gcResource = mock(GCResource.class);
GCModelLoaderFactory.createFor(gcResource);
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GCModelLoaderFactoryTest method createFor_GcResourceFile.
@Test
public void createFor_GcResourceFile() throws Exception {
GCResource gcResource = mock(GcResourceFile.class);
assertThat(GCModelLoaderFactory.createFor(gcResource), instanceOf(GCModelLoaderImpl.class));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GCModelSeriesLoaderImplTest method loadGcModel.
@Test
public void loadGcModel() throws Exception {
ArrayList<GCResource> gcResourceList = new ArrayList<>();
gcResourceList.add(new GcResourceFile(UnittestHelper.getResource(UnittestHelper.FOLDER_OPENJDK, "SampleSun1_8_0Series-Part1.txt").getPath()));
gcResourceList.add(new GcResourceFile(UnittestHelper.getResource(UnittestHelper.FOLDER_OPENJDK, "SampleSun1_8_0Series-Part2.txt").getPath()));
gcResourceList.add(new GcResourceFile(UnittestHelper.getResource(UnittestHelper.FOLDER_OPENJDK, "SampleSun1_8_0Series-Part3.txt").getPath()));
GCModelSeriesLoaderImpl loader = new GCModelSeriesLoaderImpl(new GcResourceSeries(gcResourceList));
assertThat(loader.loadGcModel(), notNullValue());
}
Aggregations