Update of /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/oscilator
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13475/src/test/net/sf/tail/indicator/oscilator
Modified Files:
StochasticOscilatorKTest.java StochasticOscilatorDTest.java
Log Message:
Index: StochasticOscilatorKTest.java
===================================================================
RCS file: /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/oscilator/StochasticOscilatorKTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** StochasticOscilatorKTest.java 20 Aug 2007 18:15:30 -0000 1.4
--- StochasticOscilatorKTest.java 23 Aug 2007 12:51:11 -0000 1.5
***************
*** 41,45 ****
@Test
public void testStochasticOscilatorKParam14() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
--- 41,45 ----
@Test
public void testStochasticOscilatorKParam14() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
***************
*** 51,55 ****
@Test
public void testStochasticOscilatorKShouldWorkJumpingIndexes() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
assertEquals(57.81, sof.getValue(13), 0.01);
--- 51,55 ----
@Test
public void testStochasticOscilatorKShouldWorkJumpingIndexes() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
assertEquals(57.81, sof.getValue(13), 0.01);
***************
*** 62,68 ****
sof.getValue(1300);
}
@Test
! public void testGetName()
! {
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
assertEquals("StochasticOscilatorK timeFrame: 14", sof.getName());
--- 62,68 ----
sof.getValue(1300);
}
+
@Test
! public void testGetName() {
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
assertEquals("StochasticOscilatorK timeFrame: 14", sof.getName());
Index: StochasticOscilatorDTest.java
===================================================================
RCS file: /cvsroot/tail/Tail/src/test/net/sf/tail/indicator/oscilator/StochasticOscilatorDTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** StochasticOscilatorDTest.java 20 Aug 2007 18:15:30 -0000 1.4
--- StochasticOscilatorDTest.java 23 Aug 2007 12:51:11 -0000 1.5
***************
*** 39,63 ****
}
-
@Test
public void testStochasticOscilatorDParam14UsingSMA3AndGenericConstructer() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
SMAIndicator sma = new SMAIndicator(sof, 3);
StochasticOscilatorD sos = new StochasticOscilatorD(sma);
!
!
assertEquals(sma.getValue(0), sos.getValue(0), 0.01);
assertEquals(sma.getValue(1), sos.getValue(1), 0.01);
assertEquals(sma.getValue(2), sos.getValue(2), 0.01);
}
!
@Test
public void testStochasticOscilatorDParam14UsingSMA3() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
StochasticOscilatorD sos = new StochasticOscilatorD(sof);
SMAIndicator sma = new SMAIndicator(sof, 3);
!
assertEquals(sma.getValue(0), sos.getValue(0), 0.01);
assertEquals(sma.getValue(1), sos.getValue(1), 0.01);
--- 39,61 ----
}
@Test
public void testStochasticOscilatorDParam14UsingSMA3AndGenericConstructer() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
SMAIndicator sma = new SMAIndicator(sof, 3);
StochasticOscilatorD sos = new StochasticOscilatorD(sma);
!
assertEquals(sma.getValue(0), sos.getValue(0), 0.01);
assertEquals(sma.getValue(1), sos.getValue(1), 0.01);
assertEquals(sma.getValue(2), sos.getValue(2), 0.01);
}
!
@Test
public void testStochasticOscilatorDParam14UsingSMA3() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
StochasticOscilatorD sos = new StochasticOscilatorD(sof);
SMAIndicator sma = new SMAIndicator(sof, 3);
!
assertEquals(sma.getValue(0), sos.getValue(0), 0.01);
assertEquals(sma.getValue(1), sos.getValue(1), 0.01);
***************
*** 67,75 ****
@Test
public void testStochasticOscilatorDShouldWorkJumpingIndexes() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
StochasticOscilatorD sos = new StochasticOscilatorD(sof);
SMAIndicator sma = new SMAIndicator(sof, 3);
!
assertEquals(sma.getValue(13), sos.getValue(13), 0.01);
}
--- 65,73 ----
@Test
public void testStochasticOscilatorDShouldWorkJumpingIndexes() {
!
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
StochasticOscilatorD sos = new StochasticOscilatorD(sof);
SMAIndicator sma = new SMAIndicator(sof, 3);
!
assertEquals(sma.getValue(13), sos.getValue(13), 0.01);
}
***************
*** 80,90 ****
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
StochasticOscilatorD sos = new StochasticOscilatorD(sof);
!
sos.getValue(14);
}
@Test
! public void testGetName()
! {
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
StochasticOscilatorD sos = new StochasticOscilatorD(sof);
--- 78,87 ----
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
StochasticOscilatorD sos = new StochasticOscilatorD(sof);
!
sos.getValue(14);
}
@Test
! public void testGetName() {
StochasticOscilatorK sof = new StochasticOscilatorK(data, 14);
StochasticOscilatorD sos = new StochasticOscilatorD(sof);
|