Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.regnosys.rosetta.common.transform.PipelineModel;
import com.regnosys.rosetta.common.transform.TestPackModel;
import com.regnosys.rosetta.common.transform.TransformType;
import com.regnosys.rosetta.common.util.UrlUtils;
import com.regnosys.rosetta.common.validation.ValidationReport;
import com.regnosys.testing.reports.ObjectMapperGenerator;
import com.regnosys.testing.validation.ValidationSummariser;
Expand Down Expand Up @@ -207,7 +208,7 @@ private TestPackModel writeTestPackSamples(Path resourcesPath,
String baseFileName = getBaseFileName(inputSample.toUri().toURL());
String displayName = baseFileName.replace("-", " ");

TestPackModel.SampleModel sampleModel = new TestPackModel.SampleModel(baseFileName.toLowerCase(), displayName, inputSample.toString(), outputPath.toString(), assertions);
TestPackModel.SampleModel sampleModel = new TestPackModel.SampleModel(baseFileName.toLowerCase(), displayName, UrlUtils.toPortableString(inputSample), UrlUtils.toPortableString(outputPath), assertions);
sampleModels.add(sampleModel);

Files.createDirectories(resourcesPath.resolve(outputPath).getParent());
Expand Down Expand Up @@ -279,7 +280,7 @@ private Map<String, List<Path>> filterAndGroupingByTestPackId(Path resourcesPath
private String testPackId(Path resourcesPath, Path inputPath, Path samplePath) {
Path parent = samplePath.getParent();
Path relativePath = resourcesPath.relativize(inputPath).relativize(parent);
return relativePath.toString().replace(File.separatorChar, '-');
return UrlUtils.toPortableString(relativePath).replace(File.separatorChar, '-');
}

private @NotNull Map<String, List<Path>> filterTestPacks(PipelineNode pipelineNode, PipelineTestPackFilter pipelineTestPackFilter, Map<String, List<Path>> testPackToSamples) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void downloadLatestVersions() throws IOException, NoSuchAlgorithmExceptio
deleteFileFolder(new File(LatestSchemesImportTest.CODE_LIST_ZIP));
deleteFileFolder(new File(LatestSchemesImportTest.CODE_LIST));
}
assertEquals("39a7fdb456d6c5b38272bd973fd0203a", checksum, "CodeList zip has been updated, run again with WRITE_EXPECTATIONS enabled then update expected checksum");
assertEquals("c8d253d3d7ef86d2c88e10cf8a2ce50a", checksum, "CodeList zip has been updated, run again with WRITE_EXPECTATIONS enabled then update expected checksum");
}
}

Expand Down Expand Up @@ -142,7 +142,8 @@ private void moveFilesToFpml() {
System.out.println("copying " + path.toString());
Path d2 = destinationDir.resolve(path.getFileName());
System.out.println("destination File=" + d2);
Files.move(path, d2, StandardCopyOption.REPLACE_EXISTING);
if (Files.notExists(d2))
Files.move(path, d2, StandardCopyOption.REPLACE_EXISTING);
}
} catch (IOException ex) {
ex.printStackTrace();
Expand Down