package com.capgemini.reports.reports.parameters;

import com.capgemini.framework.teamcenter.exceptions.KurtException;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

/**
 * @author JMONTOUT
 * 
 */
@Slf4j
public class DualsGenericsTest {

    private static final String PRODUCT_97R0 = "97R0";
    private static final String GENERIC_U22 = "U22";
    private static final String GENERIC_ASSEMB_22U = "22U";
    private static final int UNIT_520 = 520;


    private ProductUnit getProductUnit() {
        return new ProductUnit(PRODUCT_97R0, UNIT_520);
    }

    /**
     * JUNIT Test
     * 
     * @throws KurtException should not happen
     */
    @Test
    public void testCreateDualGenerics() throws KurtException {
        log.info("testCreateDualGenerics ....");

        DualGenerics dualGenerics = new DualGenerics(getProductUnit(), GENERIC_U22, GENERIC_ASSEMB_22U);
        log.info("###############################");
        log.info("Type : " + dualGenerics.asGeneric().getType());
        log.info("ID : " + dualGenerics.asGeneric().getID());
        log.info("toString : " + dualGenerics.asGeneric().toString());
        log.info("BOMLine : " + dualGenerics.asGeneric().getType().getBomLinkType());
        log.info("###############################");
        log.info("Type : " + dualGenerics.asGenericAssemb().getType());
        log.info("ID : " + dualGenerics.asGenericAssemb().getID());
        log.info("toString : " + dualGenerics.asGenericAssemb().toString());
        log.info("BOMLine : " + dualGenerics.asGenericAssemb().getType().getBomLinkType());
    }


}
