コード例 #1
0
ファイル: ForgeTest.java プロジェクト: 8carroll/geppetto
 @Before
 public void setUp() throws Exception {
   ForgeService forgeService = ForgeFactory.eINSTANCE.createForgeService();
   fixture =
       forgeService.createForge(
           URI.create("http://forge.puppetlabs.com"),
           ForgeTests.getTestOutputFolder("cache", false));
 }
コード例 #2
0
 @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());
   }
 }
コード例 #3
0
ファイル: ForgeTest.java プロジェクト: 8carroll/geppetto
 @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());
   }
 }
コード例 #4
0
 @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());
   }
 }
コード例 #5
0
 @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());
   }
 }
コード例 #6
0
 @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());
   }
 }
コード例 #7
0
 @Test
 public void testCreateRepository__URI() {
   assertNotNull(fixture.createRepository(URI.create("http://forge.puppetlabs.com")));
 }
コード例 #8
0
 @Test
 public void testCreateMetadata__String() {
   assertNotNull(fixture.createMetadata("cloudsmith/testmodule"));
 }