Skip to content

Commit

Permalink
[APHL-1326] latest from Tx Server is now supported
Browse files Browse the repository at this point in the history
  • Loading branch information
taha.attari@smilecdr.com committed Dec 21, 2024
1 parent 77baf99 commit 36c56a4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,31 +484,6 @@ void releaseResource_propagate_effective_period() {
repo);
}

@Test
void releaseResource_latestFromTx_NotSupported_test() {
Bundle bundle = (Bundle) jsonParser.parseResource(
ReleaseVisitorTests.class.getResourceAsStream("Bundle-small-approved-draft.json"));
repo.transaction(bundle);

String actualErrorMessage = "";

Parameters params = parameters(
part("version", "1.2.3"),
part("versionBehavior", new CodeType("default")),
part("latestFromTxServer", new BooleanType(true)));
var releaseVisitor = new ReleaseVisitor(repo);
Library library = repo.read(Library.class, new IdType("Library/SpecificationLibrary"))
.copy();
ILibraryAdapter libraryAdapter = new AdapterFactory().createLibrary(library);

try {
libraryAdapter.accept(releaseVisitor, params);
} catch (Exception e) {
actualErrorMessage = e.getMessage();
}
assertTrue(actualErrorMessage.contains("not yet implemented"));
}

@Test
void release_missing_approvalDate_validation_test() {
Bundle bundle = (Bundle) jsonParser.parseResource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,31 +459,6 @@ void releaseResource_propagate_effective_period() {
repo);
}

@Test
void releaseResource_latestFromTx_NotSupported_test() {
Bundle bundle = (Bundle) jsonParser.parseResource(
ReleaseVisitorTests.class.getResourceAsStream("Bundle-small-approved-draft.json"));
repo.transaction(bundle);

String actualErrorMessage = "";

Parameters params = parameters(
part("version", "1.2.3"),
part("versionBehavior", new CodeType("default")),
part("latestFromTxServer", new BooleanType(true)));
ReleaseVisitor releaseVisitor = new ReleaseVisitor(repo);
Library library = repo.read(Library.class, new IdType("Library/SpecificationLibrary"))
.copy();
ILibraryAdapter libraryAdapter = new AdapterFactory().createLibrary(library);

try {
libraryAdapter.accept(releaseVisitor, params);
} catch (Exception e) {
actualErrorMessage = e.getMessage();
}
assertTrue(actualErrorMessage.contains("not yet implemented"));
}

@Test
void release_missing_approvalDate_validation_test() {
Bundle bundle = (Bundle) jsonParser.parseResource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,31 +456,6 @@ void releaseResource_propagate_effective_period() {
repo);
}

@Test
void releaseResource_latestFromTx_NotSupported_test() {
Bundle bundle = (Bundle) jsonParser.parseResource(
ReleaseVisitorTests.class.getResourceAsStream("Bundle-small-approved-draft.json"));
repo.transaction(bundle);

String actualErrorMessage = "";

Parameters params = parameters(
part("version", "1.2.3"),
part("versionBehavior", new CodeType("default")),
part("latestFromTxServer", new BooleanType(true)));
ReleaseVisitor releaseVisitor = new ReleaseVisitor(repo);
Library library = repo.read(Library.class, new IdType("Library/SpecificationLibrary"))
.copy();
ILibraryAdapter libraryAdapter = new AdapterFactory().createLibrary(library);

try {
libraryAdapter.accept(releaseVisitor, params);
} catch (Exception e) {
actualErrorMessage = e.getMessage();
}
assertTrue(actualErrorMessage.contains("not yet implemented"));
}

@Test
void release_missing_approvalDate_validation_test() {
Bundle bundle = (Bundle) jsonParser.parseResource(
Expand Down

0 comments on commit 36c56a4

Please sign in to comment.