Restore and fix failing SimpleWorkerContextTests (#1557)
* Restore and fix failing tests * Bump test cases version * Use released test cases
This commit is contained in:
parent
3a1946e37d
commit
af43ce9fbd
|
@ -325,7 +325,7 @@ public class SimpleWorkerContextTests {
|
||||||
|
|
||||||
ValueSetExpansionOutcome actualExpansionResult = context.expandVS(inc, true, false);
|
ValueSetExpansionOutcome actualExpansionResult = context.expandVS(inc, true, false);
|
||||||
|
|
||||||
// assertEquals(expectedValueSet, actualExpansionResult.getValueset());
|
assertEquals(expectedValueSet, actualExpansionResult.getValueset());
|
||||||
|
|
||||||
Mockito.verify(terminologyCache).getExpansion(cacheToken);
|
Mockito.verify(terminologyCache).getExpansion(cacheToken);
|
||||||
Mockito.verify(terminologyCache).cacheExpansion(cacheToken, actualExpansionResult,true);
|
Mockito.verify(terminologyCache).cacheExpansion(cacheToken, actualExpansionResult,true);
|
||||||
|
@ -412,7 +412,7 @@ public class SimpleWorkerContextTests {
|
||||||
|
|
||||||
ValueSetExpansionOutcome actualExpansionResult = context.expandVS(vs, true, true, true, pIn, false);
|
ValueSetExpansionOutcome actualExpansionResult = context.expandVS(vs, true, true, true, pIn, false);
|
||||||
|
|
||||||
// assertEquals(expectedValueSet, actualExpansionResult.getValueset());
|
assertEquals(expectedValueSet, actualExpansionResult.getValueset());
|
||||||
|
|
||||||
Mockito.verify(terminologyCache).getExpansion(cacheToken);
|
Mockito.verify(terminologyCache).getExpansion(cacheToken);
|
||||||
Mockito.verify(terminologyCache).cacheExpansion(cacheToken, actualExpansionResult, true);
|
Mockito.verify(terminologyCache).cacheExpansion(cacheToken, actualExpansionResult, true);
|
||||||
|
@ -421,40 +421,37 @@ public class SimpleWorkerContextTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInitializationWithCache() {
|
public void testInitializationWithCache() {
|
||||||
// String address = "/...";
|
String address = "dummyUrl";
|
||||||
//
|
|
||||||
// Mockito.doReturn(true).when(terminologyCache).hasTerminologyCapabilities(address);
|
Mockito.doReturn(true).when(terminologyCache).hasTerminologyCapabilities(address);
|
||||||
//// Mockito.doReturn(true).when(terminologyCache).hasCapabilityStatement();
|
|
||||||
//
|
Mockito.doReturn(terminologyCapabilities).when(terminologyCache).getTerminologyCapabilities(address);
|
||||||
// Mockito.doReturn(terminologyCapabilities).when(terminologyCache).getTerminologyCapabilities(address);
|
|
||||||
//// Mockito.doReturn(capabilitiesStatement).when(terminologyCache).getCapabilityStatement();
|
context.connectToTSServer(new TerminologyClientR5Factory(), terminologyClient);
|
||||||
//
|
|
||||||
// context.connectToTSServer(new TerminologyClientR5Factory(), terminologyClient);
|
Mockito.verify(terminologyCache).getTerminologyCapabilities(address);
|
||||||
//
|
Mockito.verify(terminologyClient).getCapabilitiesStatementQuick();
|
||||||
// Mockito.verify(terminologyCache).getTerminologyCapabilities(address);
|
|
||||||
// Mockito.verify(terminologyClient).getCapabilitiesStatementQuick();
|
Mockito.verify(terminologyCache, times(0)).getCapabilityStatement(address);
|
||||||
//
|
Mockito.verify(terminologyClient, times(0)).getTerminologyCapabilities();
|
||||||
// Mockito.verify(terminologyCache, times(0)).getCapabilityStatement(address);
|
|
||||||
// Mockito.verify(terminologyClient, times(0)).getTerminologyCapabilities();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInitializationWithClient() {
|
public void testInitializationWithClient() {
|
||||||
// String address = "/...";
|
String address = "dummyUrl";
|
||||||
//
|
|
||||||
// Mockito.doReturn(false).when(terminologyCache).hasTerminologyCapabilities(address);
|
Mockito.doReturn(false).when(terminologyCache).hasTerminologyCapabilities(address);
|
||||||
//// Mockito.doReturn(false).when(terminologyCache).hasCapabilityStatement();
|
|
||||||
//
|
Mockito.doReturn(terminologyCapabilities).when(terminologyClient).getTerminologyCapabilities();
|
||||||
// Mockito.doReturn(terminologyCapabilities).when(terminologyClient).getTerminologyCapabilities();
|
Mockito.doReturn(capabilitiesStatement).when(terminologyClient).getCapabilitiesStatementQuick();
|
||||||
// Mockito.doReturn(capabilitiesStatement).when(terminologyClient).getCapabilitiesStatementQuick();
|
|
||||||
//
|
context.connectToTSServer(new TerminologyClientR5Factory(), terminologyClient);
|
||||||
// context.connectToTSServer(new TerminologyClientR5Factory(), terminologyClient);
|
|
||||||
//
|
Mockito.verify(terminologyCache, times(0)).getTerminologyCapabilities(address);
|
||||||
// Mockito.verify(terminologyCache, times(0)).getTerminologyCapabilities(address);
|
Mockito.verify(terminologyCache, times(0)).getCapabilityStatement(address);
|
||||||
// Mockito.verify(terminologyCache, times(0)).getCapabilityStatement(address);
|
|
||||||
//
|
Mockito.verify(terminologyClient).getTerminologyCapabilities();
|
||||||
// Mockito.verify(terminologyClient).getTerminologyCapabilities();
|
Mockito.verify(terminologyClient).getCapabilitiesStatementQuick();
|
||||||
// Mockito.verify(terminologyClient).getCapabilitiesStatementQuick();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue