@Test public void testWriteInstances_notEmpty() throws Exception { Component component = new Component( "comp" ); Instance instance = new Instance( "inst" ).component( component ).status( InstanceStatus.DEPLOYING ).channel( "c" ); instance.overriddenExports.put( "check", "true" ); instance.data.put( "something", "else" ); File targetFile = this.folder.newFile(); RuntimeModelIo.writeInstances( targetFile, Arrays.asList( instance )); Assert.assertTrue( targetFile.exists()); Assert.assertTrue( 0 < targetFile.length()); }
public static void writeInstances( File targetFile, Collection<Instance> rootInstances ) throws IOException { FileDefinition def = new FromInstances().buildFileDefinition( rootInstances, targetFile, false, true ); ParsingModelIo.saveRelationsFile( def, false, "\n" ); }
RuntimeModelIo { public static void writeInstances( File targetFile, Collection<Instance> rootInstances ) throws IOException { FileDefinition def = new FromInstances().buildFileDefinition( rootInstances, targetFile, false, true ); ParsingModelIo.saveRelationsFile( def, false, "\n" ); } }
RuntimeModelIo { public static void writeInstances( File targetFile, Collection<Instance> rootInstances ) throws IOException { FileDefinition def = new FromInstances().buildFileDefinition( rootInstances, targetFile, false, true ); ParsingModelIo.saveRelationsFile( def, false, "\n" ); } private  RuntimeModelIo(); }
RuntimeModelIo { public static void writeInstances( File targetFile, Collection<Instance> rootInstances ) throws IOException { FileDefinition def = new FromInstances().buildFileDefinition( rootInstances, targetFile, false, true ); ParsingModelIo.saveRelationsFile( def, false, "\n" ); } private  RuntimeModelIo(); static ApplicationLoadResult loadApplication( File projectDirectory ); static ApplicationLoadResult loadApplicationFlexibly( File projectDirectory ); static Graphs loadGraph( File graphFile, File graphDirectory, ApplicationLoadResult alr ); static InstancesLoadResult loadInstances( File instancesFile, File rootDirectory, Graphs graph, String applicationName ); static void writeInstances( File targetFile, Collection<Instance> rootInstances ); }
RuntimeModelIo { public static void writeInstances( File targetFile, Collection<Instance> rootInstances ) throws IOException { FileDefinition def = new FromInstances().buildFileDefinition( rootInstances, targetFile, false, true ); ParsingModelIo.saveRelationsFile( def, false, "\n" ); } private  RuntimeModelIo(); static ApplicationLoadResult loadApplication( File projectDirectory ); static ApplicationLoadResult loadApplicationFlexibly( File projectDirectory ); static Graphs loadGraph( File graphFile, File graphDirectory, ApplicationLoadResult alr ); static InstancesLoadResult loadInstances( File instancesFile, File rootDirectory, Graphs graph, String applicationName ); static void writeInstances( File targetFile, Collection<Instance> rootInstances );  }