package com.ibm.devworks;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import static org.junit.Assert.assertTrue;

/**
 * Unit test for simple App.
 */
public class NumOpsTest {
    /**
     * Rigourous Test :-)
     */
    @Test
    public void testNumOps() {
/*    	
		ApplicationContext ac = new ClassPathXmlApplicationContext(
		"classpath:applicationContext.xml");
        //	NumOps nop = new NumOps();
		NumOps nops = (NumOps)ac.getBean("numOps");

    	assertTrue( nops.size() == 3);
        assertTrue( nops.getOp(0).getDesc().equals("plus"));
        assertTrue( nops.getOp(0).op(2,1) == 3);
  
        assertTrue( nops.getOp(1).getDesc().equals("minus"));
        assertTrue( nops.getOp(1).op(2,1) == 1);

        assertTrue( nops.getOp(2).getDesc().equals("times"));
        assertTrue( nops.getOp(2).op(2,1) == 2);
*/
    }
}
