@@ -0,0 +1,2786 @@
+package org.ihtsdo.buildcloud.service;%0A%0Aimport java.text.ParseException;%0Aimport java.util.Date;%0A%0Aimport org.apache.commons.lang3.time.DateUtils;%0Aimport org.ihtsdo.buildcloud.dao.BuildDAO;%0Aimport org.ihtsdo.buildcloud.entity.Build;%0Aimport org.ihtsdo.buildcloud.entity.BuildConfiguration;%0Aimport org.ihtsdo.buildcloud.entity.ExtensionConfig;%0Aimport org.ihtsdo.buildcloud.entity.Product;%0Aimport org.ihtsdo.buildcloud.entity.ReleaseCenter;%0Aimport org.ihtsdo.buildcloud.service.build.ReleaseFileGenerationException;%0Aimport org.ihtsdo.buildcloud.service.build.Rf2FileExportRunner;%0Aimport org.ihtsdo.buildcloud.service.build.transform.UUIDGenerator;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0A%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@ContextConfiguration(locations=%7B%22/test/testDataServiceContext.xml%22%7D)%0A/*%0A * Add local config before run the harness %0A * eg: -DdataServicePropertiesPath=file:///Users/mchu/srs/config/config.properties -Xms1024m -Xmx4g%0A */%0Apublic class Rf2FileExportRunnerTestHarness %7B%0A%09@Autowired%0A%09private BuildDAO dao;%0A%09@Autowired%0A%09private UUIDGenerator uuidGenerator;%0A%09%0A%09@Test%0A%09public void testEditionReleaseExport() throws ParseException, ReleaseFileGenerationException %7B%0A%09%09Build build = createBuild();%0A%09%09Rf2FileExportRunner exportRunner = new Rf2FileExportRunner(build,dao, uuidGenerator, 1);%0A%09%09String transformedSnapshotFilename = %22sct2_Relationship_Snapshot_US1000124_20170301.txt%22;%0A%09%09exportRunner.generateRelationshipFilesFromTransformedClassifierResult(transformedSnapshotFilename);%0A%09%7D%0A%09%0A%09%0A%09private Build createBuild() throws ParseException %7B%0A%09%09Date releaseDate = DateUtils.parseDate(%2220170301%22, %22yyyyMMdd%22);%0A%09%09Product testProduct = new Product(%22snomed_ct_us_edition_20170301_testing%22);%0A%09%09testProduct.setReleaseCenter(new ReleaseCenter(%22US release center%22, %22us%22));%0A%09%09Build build = new Build(releaseDate, testProduct);%0A%09%09BuildConfiguration configuration = new BuildConfiguration();%0A%09%09configuration.setBetaRelease(false);%0A%09%09configuration.setCreateLegacyIds(false);%0A%09%09configuration.setEffectiveTime(releaseDate);%0A%09%09ExtensionConfig extensionConfig = new ExtensionConfig();%0A%09%09extensionConfig.setModuleId(%22731000124108%22);%0A%09%09extensionConfig.setNamespaceId(%221000124%22);%0A%09%09extensionConfig.setReleaseAsAnEdition(true);%0A%09%09extensionConfig.setDependencyRelease(%22SnomedCT_InternationalRF2_Production_20170131T120000.zip%22);%0A%09%09configuration.setExtensionConfig(extensionConfig);%0A%09%09configuration.setFirstTimeRelease(false);%0A%09%09configuration.setPreviousPublishedPackage(%22SnomedCT_RF2Release_US1000124_20160901.zip%22);%0A%09%09build.setConfiguration(configuration);%0A%09%09return build;%0A%09%7D%0A%0A%7D%0A

Add test harness