/**
 * ParameterReferenceHelperTest.java
 * Created on May 20, 2008
 * (C) Copyright TANDBERG Television Ltd.
 */
package com.tandbergtv.watchpoint.pmm.job.unitTests;

import junit.framework.TestCase;
import com.tandbergtv.watchpoint.pmm.job.util.ParameterReferenceHelper;

/**
 * @author spuranik
 * 
 */
public class ParameterReferenceHelperTest extends TestCase {

	public void testGettingPropertyName() {
		String parameterReferenceProperty = "$Title Metadata.ADI.Liscence Start Date";
		String propertyName = ParameterReferenceHelper.getPropertyName(parameterReferenceProperty);
		System.out.println("Property Name: " + propertyName);
	}

	public void testGettingGroupName() {
		String parameterReferenceProperty = "$Title Metadata.ADI.Liscence Start Date";
		String groupName = ParameterReferenceHelper.getGroupName((parameterReferenceProperty));
		System.out.println("Group Name: " + groupName);
	}

	public void testBuildingString() {
		String groupName = "Title";
		String propertyName = "Liscence Start Date";
		String combined = ParameterReferenceHelper.buildParameterReferenceProperty(groupName,
				propertyName);
		System.out.println("Parameter Reference String: " + combined);
	}
	
	public void testIsReference()
	{
		// String property = "$Title Metadata.ADI.Liscence Start Date";
		// String property = "SomeText";
		String property = "$Partner.Id";
		boolean isReference = ParameterReferenceHelper.isParameterReference(property);
		System.out.println("Is: " + property + " a reference: " + isReference);
		
	}
}
