use of com.google.cloud.tools.managedcloudsdk.components.SdkUpdater in project google-cloud-intellij by GoogleCloudPlatform.
the class ManagedCloudSdkServiceTest method emulateMockSdkUpdateProcess.
/**
* Mocks out-of-date SDK and update process.
*/
private void emulateMockSdkUpdateProcess() {
try {
when(mockManagedCloudSdk.isUpToDate()).thenReturn(false);
SdkUpdater mockUpdater = mock(SdkUpdater.class);
when(mockManagedCloudSdk.newUpdater()).thenReturn(mockUpdater);
} catch (Exception ex) {
// shouldn't happen in the tests.
throw new AssertionError(ex);
}
}
Aggregations