@Test public void testGetSkinFile_FileFound() throws Exception { subAppResourcesNetworkServicePluginRoot.start(); catchException(subAppResourcesNetworkServicePluginRoot) .getSkinFile(skinId.randomUUID(), "walletPublicKey"); assertThat(caughtException()).isNull(); }
@Before public void setUp() throws Exception { subAppResourcesNetworkServicePluginRoot = new SubAppResourcesNetworkServicePluginRoot(); subAppResourcesNetworkServicePluginRoot.setPluginFileSystem(pluginFileSystem); subAppResourcesNetworkServicePluginRoot.setEventManager(mockEventManager); subAppResourcesNetworkServicePluginRoot.setErrorManager(errorManager); subAppResourcesNetworkServicePluginRoot.setPluginDatabaseSystem(mockPluginDatabaseSystem); when(mockPluginDatabaseSystem.openDatabase(any(UUID.class), anyString())) .thenReturn(mockDatabase); when(gitHubConnection.getFile(anyString())).thenReturn(repoManifest); when(pluginFileSystem.createTextFile( any(UUID.class), anyString(), anyString(), any(FilePrivacy.class), any(FileLifeSpan.class))) .thenReturn(layoutFile); when(pluginFileSystem.createBinaryFile( any(UUID.class), anyString(), anyString(), any(FilePrivacy.class), any(FileLifeSpan.class))) .thenReturn(imageFile); when(mockEventManager.getNewListener(EventType.BEGUN_WALLET_INSTALLATION)) .thenReturn(mockFermatEventListener); when(pluginFileSystem.getTextFile( any(UUID.class), anyString(), anyString(), any(FilePrivacy.class), any(FileLifeSpan.class))) .thenReturn(mockPluginTextFile); setUpDataBase(); }
@Test public void getClassTest() throws CantStartPluginException { pluginRoot = new SubAppResourcesNetworkServicePluginRoot(); assertThat(pluginRoot.getClassesFullPath()).isInstanceOf(List.class); }
@Test public void testGetSkinFile_FileNotFound() throws Exception { subAppResourcesNetworkServicePluginRoot.start(); catchException(subAppResourcesNetworkServicePluginRoot).getSkinFile(null, null); assertThat(caughtException()).isNotNull(); }