Package name.abuchen.portfolio.math

Examples of name.abuchen.portfolio.math.NPVFunction


public class NPVFunctionTest
{
    @Test(expected = NullPointerException.class)
    public void testNullArguments()
    {
        new NPVFunction(null, null);
    }
View Full Code Here


    }

    @Test(expected = UnsupportedOperationException.class)
    public void testInvalidArguments()
    {
        new NPVFunction(Arrays.asList(new Date()), new ArrayList<Double>());
    }
View Full Code Here

    }

    @Test(expected = UnsupportedOperationException.class)
    public void testEmptyArguments()
    {
        new NPVFunction(new ArrayList<Date>(), new ArrayList<Double>());
    }
View Full Code Here

    {
        Calendar cal = Calendar.getInstance();
        cal.set(2010, 0, 1);
        cal.getTime();

        NPVFunction f = new NPVFunction(Arrays.asList( //
                        Dates.date(2010, Calendar.JANUARY, 1), //
                        Dates.date(2010, Calendar.DECEMBER, 31)), //
                        Arrays.asList(-200d, 210d));

        assertThat(f.compute(0.05d), is(3965.669635841685d));
    }
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.math.NPVFunction

Copyright © 2018 www.massapicom. 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.