Skip to content

Commit

Permalink
Fixed b053 seed text
Browse files Browse the repository at this point in the history
  • Loading branch information
Suleiman authored and Suleiman committed Dec 26, 2018
1 parent 874518f commit e1b439c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/main/java/edu/iris/dmc/seed/control/station/B053.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import edu.iris.dmc.io.SeedStringBuilder;
import edu.iris.dmc.seed.Blockette;

public class B053 extends AbstractResponseBlockette{

Expand Down
12 changes: 9 additions & 3 deletions src/test/java/edu/iris/dmc/seed/control/station/B053Test.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
package edu.iris.dmc.seed.control.station;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.junit.Test;

import edu.iris.dmc.seed.Blockette;
import edu.iris.dmc.seed.BlocketteFactory;

public class B053Test {

@Test
public void te() throws Exception {
String text = "0530382A01001002+3.14096E+02+1.00000E+00003+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00-1.70000E-01+0.00000E+00+0.00000E+00+0.00000E+00004+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00-3.14000E+02+0.00000E+00+0.00000E+00+0.00000E+00-1.88000E-01+0.00000E+00+0.00000E+00+0.00000E+00-4.40000E-02+0.00000E+00+0.00000E+00+0.00000E+00";
String text = "0530382A01001002+3.14096E+02+1.00000E+00003+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00-1.70000E-01+0.00000E+00+0.00000E+00+0.00000E+00004+0.00000E+00+0.00000E+00+0.00000E+00+0.00000E+00-3.14000E+02+0.00000E+00+0.00000E+00+0.00000E+00-1.88000E-01+0.00000E+00+0.00000E+00+0.00000E+00-4.40000E-02+0.00000E+00+2.00000E-04+2.00000E-04";
B053 b053 = (B053) BlocketteFactory.create(text.getBytes());

Blockette b053 = BlocketteFactory.create(text.getBytes());
assertNotNull(b053.getPoles());
assertEquals(4, b053.getPoles().size());
Pole pole = b053.getPoles().get(3);
assertNotNull(pole.getImaginary());
assertEquals(0, pole.getImaginary().getValue(),0.0000000001);
assertEquals(0.00020E+00, pole.getImaginary().getError(),0.0000000001);
assertEquals(text, b053.toSeedString());
}
}

0 comments on commit e1b439c

Please sign in to comment.