Examples of NPVFunction


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

Examples of name.abuchen.portfolio.math.NPVFunction

    }

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

Examples of name.abuchen.portfolio.math.NPVFunction

    }

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

Examples of name.abuchen.portfolio.math.NPVFunction

    {
        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
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.