Package com.puppetlabs.geppetto.forge.tests

Source Code of com.puppetlabs.geppetto.forge.tests.ForgeServiceTest

/**
* Copyright (c) 2013 Puppet Labs, Inc. and other contributors, as listed below.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*   Puppet Labs
*/
package com.puppetlabs.geppetto.forge.tests;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import java.io.IOException;

import org.junit.Test;

import com.puppetlabs.geppetto.forge.model.Metadata;
import com.puppetlabs.geppetto.forge.model.ModuleName;

public class ForgeServiceTest extends AbstractForgeTest {

  @Test
  public void testLoadJSONMetadata__File() {
    try {
      Metadata md = getForgeUtil().loadJSONMetadata(getTestData("puppetlabs-apache/metadata.json"));
      assertEquals("Unexpected module name", ModuleName.fromString("puppetlabs-apache"), md.getName());
    }
    catch(IOException e) {
      fail(e.getMessage());
    }
  }
}
TOP

Related Classes of com.puppetlabs.geppetto.forge.tests.ForgeServiceTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.