+ assertEquals(component.getPositionValue(), 10d/RocksimHandler.ROCKSIM_TO_OPENROCKET_LENGTH);
+
+ handler.closeElement("Thickness", attributes, "0.02", warnings);
+ assertEquals(0.01848, handler.computeDensity(RocksimDensityType.ROCKSIM_BULK, 924d));
+
+ //Test Density Type 0 (Bulk)
+ handler.closeElement("Density", attributes, "924.0", warnings);
+ handler.closeElement("DensityType", attributes, "0", warnings);
+ handler.endHandler("Streamer", attributes, null, warnings);
+ assertEquals(0.01848d, component.getMaterial().getDensity());
+
+ //Test Density Type 1 (Surface)
+ handler.closeElement("Density", attributes, "0.006685", warnings);
+ handler.closeElement("DensityType", attributes, "1", warnings);
+ handler.endHandler("Streamer", attributes, null, warnings);
+ assertTrue(Math.abs(0.06685d - component.getMaterial().getDensity()) < 0.00001);
+
+ //Test Density Type 2 (Line)
+ handler.closeElement("Density", attributes, "0.223225", warnings);
+ handler.closeElement("DensityType", attributes, "2", warnings);
+ handler.closeElement("Len", attributes, "3810.", warnings);
+ handler.closeElement("Width", attributes, "203.2", warnings);
+ handler.endHandler("Streamer", attributes, null, warnings);
+
+ assertEquals(1.728190092, component.getMass());
+