|
From: Márcio V. d. S. <mv...@us...> - 2007-08-23 12:51:39
|
Update of /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/helper In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13475/src/test/net/sf/tail/indicator/helper Modified Files: AverageLossIndicatorTest.java LowestValueIndicatorTest.java StandardDeviationIndicatorTest.java HighestValueIndicatorTest.java AverageGainIndicatorTest.java Log Message: Index: StandardDeviationIndicatorTest.java =================================================================== RCS file: /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/helper/StandardDeviationIndicatorTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StandardDeviationIndicatorTest.java 26 Jul 2007 22:23:34 -0000 1.3 --- StandardDeviationIndicatorTest.java 23 Aug 2007 12:51:09 -0000 1.4 *************** *** 66,73 **** quoteSDV.getValue(13); } ! @Test ! public void testGetName() ! { StandardDeviationIndicator quoteSDV = new StandardDeviationIndicator(new ClosePriceIndicator(data), 3); assertEquals("StandardDeviationIndicator timeFrame: 3", quoteSDV.getName()); --- 66,72 ---- quoteSDV.getValue(13); } ! @Test ! public void testGetName() { StandardDeviationIndicator quoteSDV = new StandardDeviationIndicator(new ClosePriceIndicator(data), 3); assertEquals("StandardDeviationIndicator timeFrame: 3", quoteSDV.getName()); Index: AverageLossIndicatorTest.java =================================================================== RCS file: /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/helper/AverageLossIndicatorTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AverageLossIndicatorTest.java 26 Jul 2007 22:23:34 -0000 1.4 --- AverageLossIndicatorTest.java 23 Aug 2007 12:51:09 -0000 1.5 *************** *** 49,53 **** public void testAverageLossWhenTimeFrameIsGreaterThanIndex() { AverageLossIndicator averageLoss = new AverageLossIndicator(new ClosePriceIndicator(data), 1000); ! assertEquals(5d/data.getSize(), averageLoss.getValue(12), 0.01); } --- 49,53 ---- public void testAverageLossWhenTimeFrameIsGreaterThanIndex() { AverageLossIndicator averageLoss = new AverageLossIndicator(new ClosePriceIndicator(data), 1000); ! assertEquals(5d / data.getSize(), averageLoss.getValue(12), 0.01); } *************** *** 57,61 **** assertEquals(0, averageLoss.getValue(0), 0.01); } ! @Test(expected = IndexOutOfBoundsException.class) public void testIndexGreatterThanTheIndicatorLenghtShouldThrowException() { --- 57,61 ---- assertEquals(0, averageLoss.getValue(0), 0.01); } ! @Test(expected = IndexOutOfBoundsException.class) public void testIndexGreatterThanTheIndicatorLenghtShouldThrowException() { *************** *** 63,69 **** assertEquals(3d, averageLoss.getValue(300)); } @Test ! public void testGetName() ! { AverageLossIndicator averageLoss = new AverageLossIndicator(new ClosePriceIndicator(data), 5); assertEquals("AverageLossIndicator timeFrame: 5", averageLoss.getName()); --- 63,69 ---- assertEquals(3d, averageLoss.getValue(300)); } + @Test ! public void testGetName() { AverageLossIndicator averageLoss = new AverageLossIndicator(new ClosePriceIndicator(data), 5); assertEquals("AverageLossIndicator timeFrame: 5", averageLoss.getName()); Index: AverageGainIndicatorTest.java =================================================================== RCS file: /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/helper/AverageGainIndicatorTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AverageGainIndicatorTest.java 26 Jul 2007 22:23:34 -0000 1.4 --- AverageGainIndicatorTest.java 23 Aug 2007 12:51:09 -0000 1.5 *************** *** 48,52 **** public void testAverageGainWhenTimeFrameIsGreaterThanIndicatorDataShouldBeCalculatedWithDataSize() { AverageGainIndicator averageGain = new AverageGainIndicator(new ClosePriceIndicator(data), 1000); ! assertEquals(6d/data.getSize(), averageGain.getValue(12), 0.01); } --- 48,52 ---- public void testAverageGainWhenTimeFrameIsGreaterThanIndicatorDataShouldBeCalculatedWithDataSize() { AverageGainIndicator averageGain = new AverageGainIndicator(new ClosePriceIndicator(data), 1000); ! assertEquals(6d / data.getSize(), averageGain.getValue(12), 0.01); } *************** *** 56,60 **** assertEquals(0, averageGain.getValue(0), 0.01); } ! @Test(expected = IndexOutOfBoundsException.class) public void testIndexGreatterThanTheIndicatorLenghtShouldThrowException() { --- 56,60 ---- assertEquals(0, averageGain.getValue(0), 0.01); } ! @Test(expected = IndexOutOfBoundsException.class) public void testIndexGreatterThanTheIndicatorLenghtShouldThrowException() { *************** *** 62,71 **** assertEquals(3d, averageGain.getValue(300)); } @Test ! public void testGetName() ! { AverageGainIndicator averageGain = new AverageGainIndicator(new ClosePriceIndicator(data), 5); assertEquals("AverageGainIndicator timeFrame: 5", averageGain.getName()); } ! } --- 62,71 ---- assertEquals(3d, averageGain.getValue(300)); } + @Test ! public void testGetName() { AverageGainIndicator averageGain = new AverageGainIndicator(new ClosePriceIndicator(data), 5); assertEquals("AverageGainIndicator timeFrame: 5", averageGain.getName()); } ! } Index: HighestValueIndicatorTest.java =================================================================== RCS file: /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/helper/HighestValueIndicatorTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HighestValueIndicatorTest.java 26 Jul 2007 22:23:34 -0000 1.4 --- HighestValueIndicatorTest.java 23 Aug 2007 12:51:09 -0000 1.5 *************** *** 45,49 **** assertEquals(6d, highestValue.getValue(12), 0.01); } ! @Test public void testHighestValueShouldWorkJumpingIndexes() { --- 45,49 ---- assertEquals(6d, highestValue.getValue(12), 0.01); } ! @Test public void testHighestValueShouldWorkJumpingIndexes() { *************** *** 60,65 **** @Test ! public void testGetName() ! { HighestValueIndicator highestValue = new HighestValueIndicator(new ClosePriceIndicator(data), 5); assertEquals("HighestValueIndicator timeFrame: 5", highestValue.getName()); --- 60,64 ---- @Test ! public void testGetName() { HighestValueIndicator highestValue = new HighestValueIndicator(new ClosePriceIndicator(data), 5); assertEquals("HighestValueIndicator timeFrame: 5", highestValue.getName()); Index: LowestValueIndicatorTest.java =================================================================== RCS file: /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/helper/LowestValueIndicatorTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LowestValueIndicatorTest.java 26 Jul 2007 22:23:34 -0000 1.4 --- LowestValueIndicatorTest.java 23 Aug 2007 12:51:09 -0000 1.5 *************** *** 52,56 **** assertEquals(1d, lowestValue.getValue(12), 0.01); } ! @Test(expected = IndexOutOfBoundsException.class) public void testIndexGreatterThanTheIndicatorLenghtShouldThrowException() { --- 52,56 ---- assertEquals(1d, lowestValue.getValue(12), 0.01); } ! @Test(expected = IndexOutOfBoundsException.class) public void testIndexGreatterThanTheIndicatorLenghtShouldThrowException() { *************** *** 58,64 **** assertEquals(3d, lowestValue.getValue(300)); } @Test ! public void testGetName() ! { LowestValueIndicator lowestValue = new LowestValueIndicator(new ClosePriceIndicator(data), 5); assertEquals("LowestValueIndicator timeFrame: 5", lowestValue.getName()); --- 58,64 ---- assertEquals(3d, lowestValue.getValue(300)); } + @Test ! public void testGetName() { LowestValueIndicator lowestValue = new LowestValueIndicator(new ClosePriceIndicator(data), 5); assertEquals("LowestValueIndicator timeFrame: 5", lowestValue.getName()); |