From e1b439cfc1ad938597e9fa1b1395a609343801c4 Mon Sep 17 00:00:00 2001 From: Suleiman Date: Wed, 26 Dec 2018 08:31:59 -0800 Subject: [PATCH] Fixed b053 seed text --- .../java/edu/iris/dmc/seed/control/station/B053.java | 2 -- .../edu/iris/dmc/seed/control/station/B053Test.java | 12 +++++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/iris/dmc/seed/control/station/B053.java b/src/main/java/edu/iris/dmc/seed/control/station/B053.java index 5202411..108d41a 100644 --- a/src/main/java/edu/iris/dmc/seed/control/station/B053.java +++ b/src/main/java/edu/iris/dmc/seed/control/station/B053.java @@ -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{ diff --git a/src/test/java/edu/iris/dmc/seed/control/station/B053Test.java b/src/test/java/edu/iris/dmc/seed/control/station/B053Test.java index bbcaa72..8f42dd6 100644 --- a/src/test/java/edu/iris/dmc/seed/control/station/B053Test.java +++ b/src/test/java/edu/iris/dmc/seed/control/station/B053Test.java @@ -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()); } }