Summary

Tests Errors Failures Skipped Success Rate Time
208 0 0 0 100% 8.624

Note: failures are anticipated and checked for with assertions while errors are unanticipated.

Package List

Package Tests Errors Failures Skipped Success Rate Time
com.nickokiss.investor.fin.env 13 0 0 0 100% 0.207
com.nickokiss.investor.util 6 0 0 0 100% 0.116
com.nickokiss.investor.function 3 0 0 0 100% 0.031
com.nickokiss.investor.fin.element.creator 1 0 0 0 100% 0.003
com.nickokiss.investor.functioncalc 26 0 0 0 100% 1.864
com.nickokiss.investor.calc 83 0 0 0 100% 2.725
com.nickokiss.investor.usecase 24 0 0 0 100% 2.207
com.nickokiss.investor.fin.element 52 0 0 0 100% 1.471

Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.

com.nickokiss.investor.fin.env

Class Tests Errors Failures Skipped Success Rate Time
ContinuousCompoundingStrategyTest 2 0 0 0 100% 0.008
EnvTest 6 0 0 0 100% 0.151
InterestRateStrategyTest 3 0 0 0 100% 0.039
PeriodicCompoundingStrategyTest 2 0 0 0 100% 0.009

com.nickokiss.investor.util

Class Tests Errors Failures Skipped Success Rate Time
RangeTest 6 0 0 0 100% 0.116

com.nickokiss.investor.function

Class Tests Errors Failures Skipped Success Rate Time
CashFlowPresentValueFunctionTest 1 0 0 0 100% 0.019
EffectiveInterestRateFunctionTest 1 0 0 0 100% 0.003
InfiniteStreamPVFunctionTest 1 0 0 0 100% 0.009

com.nickokiss.investor.fin.element.creator

Class Tests Errors Failures Skipped Success Rate Time
AddingElementCreatorTest 1 0 0 0 100% 0.003

com.nickokiss.investor.functioncalc

Class Tests Errors Failures Skipped Success Rate Time
Div2FunctionCalcSimpleTest 18 0 0 0 100% 0.079
IterativeFunctionCalcAdvancedTest 2 0 0 0 100% 0.178
IterativeFunctionCalcSimpleTest 6 0 0 0 100% 1.607

com.nickokiss.investor.calc

Class Tests Errors Failures Skipped Success Rate Time
AnnuityCalcTest 4 0 0 0 100% 0.004
BondCalcTest 25 0 0 0 100% 2.107
CashFlowStreamCalcTest 18 0 0 0 100% 0.434
CompoundInterestCalcTest 13 0 0 0 100% 0.05
ContCompInterestCalcTest 10 0 0 0 100% 0.084
MathCalcTest 7 0 0 0 100% 0.027
PortfolioCalcTest 2 0 0 0 100% 0.01
SimpleInterestCalcTest 4 0 0 0 100% 0.009

com.nickokiss.investor.usecase

Class Tests Errors Failures Skipped Success Rate Time
BondUsecasesTest 9 0 0 0 100% 1.617
CashFlowStreamUsecasesTest 11 0 0 0 100% 0.141
SpotRatesUseCasesTest 4 0 0 0 100% 0.449

com.nickokiss.investor.fin.element

Class Tests Errors Failures Skipped Success Rate Time
AnnuityTest 5 0 0 0 100% 0.032
BondTest 2 0 0 0 100% 0.046
CashFlowIRRComparatorTest 3 0 0 0 100% 0.382
CashFlowPVComparatorTest 7 0 0 0 100% 0.152
CashFlowStreamTest 24 0 0 0 100% 0.707
FinElementTest 1 0 0 0 100% 0.004
PortfolioTest 2 0 0 0 100% 0.131
StreamElementTest 7 0 0 0 100% 0.015
StreamElementTypeTest 1 0 0 0 100% 0.002

Test Cases

AnnuityCalcTest

testGetPeriodAmount 0.001
testGetPresentValue 0
testGetNumberOfPeriods 0.001
testGetValue 0

BondCalcTest

testGetDurationLimit 0.014
testEstimatePriceDifference 0.017
testEstimatePriceDifferenceWithConvexity 0.015
testGetModifiedDuration 0.014
testGetConvexity30_0 0.017
testGetMacaulayDuration30_0 0.019
testGetConvexity30_10 0.016
testGetMacaulayDuration30_10 0.009
testGetMacaulayDuration3_7 0.005
testGetPriceDifference 0.013
testGetMacaulayDuration1_1 0.005
testGetMacaulayDuration5_2 0.008
testGetMacaulayDuration100_5 0.004
testGetMacaulayDuration100_2 0.004
testGetCashFlowStream 0.031
testGetCurrentYield 0.011
testGetYield11 1.696
testGetYield15 0.053
testGetYield5 0.032
testGetCurrentPriceYield5 0.015
testGetCurrentPriceYield8 0.015
testGetCurrentPriceYield9 0.011
testGetCurrentPriceYield10 0.017
testGetCurrentPriceYield15 0.015
testGetRemainingCouponPayments 0.012

CashFlowStreamCalcTest

testGetPresentValue 0.007
testCashFlowStreamCalc 0
testRunningPresentValuePeriodicComp 0.006
testRunningPVEmptyCFS 0.007
testRunningPresentValueContComp 0.005
testGetDuration 0.009
testGetValueInFuture 0.005
testGetValueInPast 0.005
testGetFutureValue 0.009
testGetFutureValueContComp 0.005
testGetPresentValueContComp 0.008
testGetValueOfInfiniteStreamLenghtZero 0
testGetPresentValueOfInfiniteStream 0.036
testGetPresentValueZero 0.019
testGetNetPresentValue 0.007
testGetPresentWorthOfBenefits 0.005
testGetPresentWorthOfCosts 0.003
testGetInternalRateOfReturn 0.009

CompoundInterestCalcTest

testGetPresentValue 0.002
testGetValue 0
testGetFutureValue 0.001
testGetEffectiveInterestRate 0.001
testGetNominalInterestRateUsingEffIntRate 0
testGetPeriodsPerYearUsingEffIntRate 0.032
testGetNominalInterestRate 0.003
testGetPeriodsPerYear 0.001
testGetInvestmentPeriods 0.001
testGetGrownFactor 0
testGetDiscountFactor 0.001
testGetForwardRate 0
testGetDiscountFactorBetweenPeriods 0.001

ContCompInterestCalcTest

testGetPresentValue 0.008
testGetFutureValue 0.008
testGetEffectiveInterestRate 0.009
testGetNominalInterestRate 0.007
testGetGrownFactor 0.005
testGetDiscountFactor 0.005
testGetForwardRate 0.006
testGetDiscountFactorBetweenPeriods 0.008
testGetNominalInterestRateFromEff 0.006
testGetTime 0.004

MathCalcTest

testGetUnit 0.002
testDiv 0
testInvert 0.001
testLogWithBase 0.001
testLog 0
testPow 0
testExp 0.02

PortfolioCalcTest

testGetDuration 0.004
testGetPrice 0.001

SimpleInterestCalcTest

testGetPresentValue 0.001
testGetFutureValue 0.001
testGetTime 0.001
testGetInterestRate 0.001

AnnuityTest

testGetValue 0.015
testGetCashFlowStream 0.003
testGetAnnuityValueAtTimeZero 0.006
testGetAnnuityValueAtTimeOne 0.003
testGetAnnuityValueAtTimeTwo 0

BondTest

testGetCurrentPriceYield8 0.016
testGetCurrentPriceYield10 0.024

CashFlowIRRComparatorTest

testCompare 0.044
testFindStreamWithMaxIRR 0.012
testFindStreamWithMaxIRRAll 0.157

CashFlowPVComparatorTest

testCompare 0.08
testCompareGreater 0
testCompareScale14 0.002
testCompareScale17 0
testCompareZero 0.003
testFindStreamWithMaxPresentValue 0
testFindStreamWithMaxMinPresentValueAll 0.003

CashFlowStreamTest

testGetValueInFuture 0.008
testGetValueInPast 0.006
testGetPresentValueContComp 0.007
testGetQuasiModifiedDuration 0.007
testGetFisherWeilDuration 0.007
testGetPresentValuePeriodicComp 0.006
testStream 0.001
testEquals 0.004
testLength 0
testMoveForward 0
testMoveBackward 0
testGetCopy 0.002
testCopyConstructor 0.001
testRepeat 0.001
testRepeatZeroTimes 0
testAddToEmptyStream 0.001
testAddElements 0.005
testAddElementsUsingCreator 0.002
testAdd 0.004
testRepeatAndAdd 0.001
testEndTime 0.018
testStartTime 0.012
testFirstValue 0.015
testLastValue 0.01

AddingElementCreatorTest

testCreator 0.001

FinElementTest

testWhoImplement 0.003

PortfolioTest

testGetValue 0.128
testPortfolio 0

StreamElementTest

testEquals 0.005
testGetValuePriodicCompounding 0.001
testGetValueContinuousCompounding 0
testToString 0
testToString2 0
testStreamElement 0
testEqualsDifferentScale 0

StreamElementTypeTest

testStreamElementType 0

ContinuousCompoundingStrategyTest

testGetForwardRate 0.002
testGetSpotRate 0.001

EnvTest

testEnvFields 0
testEnv_constant_periodic_increase 0.032
testEnv_constant_periodic 0.03
testEnv_general_periodic12 0.033
testEnv_general_periodic2 0.022
testEnv_general_continuous 0.021

InterestRateStrategyTest

testConstantEnvironment 0.023
testGeneralEnvironment 0.012
testGeneralEnvironmentException 0

PeriodicCompoundingStrategyTest

testGetForwardRate 0
testGetSpotRate 0.002

CashFlowPresentValueFunctionTest

testFunction 0.009

EffectiveInterestRateFunctionTest

testFunction 0.002

InfiniteStreamPVFunctionTest

testFunction 0.006

Div2FunctionCalcSimpleTest

testConstantFunctionFail 0.001
testIterationsLimit 0.001
testGetParameterRange0to256 0.012
testGetParameterRangeMin1to255 0.012
testNegateGetParameterRangeMin1to255 0.013
testNegateGetInitialRange 0.004
testGetInitialRange200 0.002
testXdiv10GetInitialRange2000 0.001
testNegateGetInitialRangeMinus200 0.003
testGetInitialRange 0
testGetInitialRange6 0
testGetInitialRange7 0.001
testSimpleFunction 0.002
testCalculateInterestRateForPV 0.003
testCalculateInterestRateForPV0 0.004
testGetParameterForValue 0.001
testXdiv10GetParameterForValue 0.001
testGetParameterSmallValue 0

IterativeFunctionCalcAdvancedTest

testGetParameterOutOfRange 0.004
testGetLenghtOfCycleForInfiniteStreamPV 0.168

IterativeFunctionCalcSimpleTest

testSimpleFunction 0.011
testCalculateInterestRateForPV 0.152
testCalculateInterestRateForPV0 0.5
testGetParameterForValue 0.543
testXdiv10GetParameterForValue 0.386
testGetParameterSmallValue 0.005

BondUsecasesTest

testPriceChange 0.019
testImmunization 0.043
testAmortization 0.006
testCallableBond 1.437
testBiweeklyMortgage 0.017
testVariableRateMortgage 0.027
testBondPrice 0.004
testDuration 0.01
testBondSelection 0.046

CashFlowStreamUsecasesTest

testSimplicoGoldMinePresentValue 0.01
testAutomobilePurchase 0.038
testMachineReplacement 0.025
testNiceInheritance 0.012
testEffectiveRates 0.013
testPrize 0.015
testSunkCosts 0.01
testAppraisal 0.001
testConflictingRecommendations 0.004
testAPR 0.002
testAnnualWorth 0

SpotRatesUseCasesTest

testOneForwardRate 0.004
testSpotUpdate 0.002
testConstructionOfAZero 0.431
testRunningPV 0.006

RangeTest

testRange 0.025
testGetUpperHalf 0.035
testGetLowerHalf 0.021
testRange1 0.013
testGetDistance 0.013
testContains 0.004