@Before public void setUp() throws Exception { ForgeService forgeService = ForgeFactory.eINSTANCE.createForgeService(); fixture = forgeService.createForge( URI.create("http://forge.puppetlabs.com"), ForgeTests.getTestOutputFolder("cache", false)); }
@Test public void testCreateCache__File_Repository() { try { Repository repository = fixture.createRepository(URI.create("http://forge.puppetlabs.com")); File cacheFolder = ForgeTests.getTestOutputFolder("cachefolder", true); assertNotNull(fixture.createCache(cacheFolder, repository)); } catch (IOException e) { fail(e.getMessage()); } }
@Test public void testGenerate__File_Metadata() { try { ForgeService service = ForgeFactory.eINSTANCE.createForgeService(); Metadata metadata = service.createMetadata("cloudsmith/testmodule"); File installFolder = ForgeTests.getTestOutputFolder("testmodule-install", true); installFolder.delete(); fixture.generate(installFolder, metadata); } catch (IOException e) { fail(e.getMessage()); } }
@Test public void testLoadModule__File() { try { Metadata md = fixture.loadModule(Activator.getTestData("puppetlabs-apache")); assertEquals("Unexpected module name", "puppetlabs-apache", md.getFullName()); } catch (IOException e) { fail(e.getMessage()); } }
@Test public void testLoadModule__File2() { try { Metadata md = fixture.loadModule(Activator.getTestData("DavidSchmitt-collectd")); assertEquals("Unexpected module name", "DavidSchmitt-collectd", md.getFullName()); } catch (IOException e) { fail(e.getMessage()); } }
@Test public void testCreateForge__URI_File() { try { assertNotNull( fixture.createForge( URI.create("http://forge.puppetlabs.com"), ForgeTests.getTestOutputFolder("cachefolder", true))); } catch (IOException e) { fail(e.getMessage()); } }
@Test public void testCreateRepository__URI() { assertNotNull(fixture.createRepository(URI.create("http://forge.puppetlabs.com"))); }
@Test public void testCreateMetadata__String() { assertNotNull(fixture.createMetadata("cloudsmith/testmodule")); }