Package azkaban.app

Source Code of azkaban.app.PropUtilsTest

package azkaban.app;

import junit.framework.Assert;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import azkaban.common.utils.Props;

public class PropUtilsTest {
   
    @Before
    public void setUp() throws Exception
    {
    }
   
    @After
    public void tearDown() throws Exception
    {
    }
     
    @Test
    public void testResolveProps() throws Exception {
        Props inputProps = new Props();
        Props genProps = new Props();
        Props outputProps;
       
        inputProps.put("firstName", "Francesco");
        inputProps.put("fillIn", "the guilty party is ${firstName} ${lastName}");
        genProps.put("lastName", "Estaban");

        Props theProps = new Props(inputProps, genProps);
       
        outputProps = PropsUtils.resolveProps(theProps);
        String answer = outputProps.get("fillIn");
        System.out.println(answer);
       
        System.out.println("PropsUtilTest.testResolveProps: " + answer);
       
        Assert.assertEquals("the guilty party is Francesco Estaban", answer);
    }
}
TOP

Related Classes of azkaban.app.PropUtilsTest

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.