use of org.finos.legend.pure.m3.serialization.runtime.cache.MemoryGraphLoaderPureGraphCache in project legend-pure by finos.
the class TestGraphIsSerialized method testInitializedFromGraphLoaderSerialization.
@Test
public void testInitializedFromGraphLoaderSerialization() {
PureRuntime runtime = new PureRuntimeBuilder(getCodeStorage()).buildAndInitialize();
PureGraphCache cache = new MemoryGraphLoaderPureGraphCache();
cache.setPureRuntime(runtime);
cache.cacheRepoAndSources();
runtime = new PureRuntimeBuilder(getCodeStorage()).withCache(cache).buildAndTryToInitializeFromCache();
new FunctionExecutionCompiledBuilder().build().init(runtime, new Message(""));
Assert.assertTrue(cache.getCacheState().getLastStackTrace(), runtime.isInitialized());
assertAllInstancesMarkedSerialized(runtime);
}
Aggregations