Пример #1
0
 @Test
 public void testConstructorWithExponentialNumber() {
   PrimitiveDynObject o = (PrimitiveDynObject) eval("new  String(.00000012345);");
   assertThat(o.getPrimitiveValue()).isEqualTo("1.2345e-7");
 }
Пример #2
0
 @Test
 public void testConstructorWithNonString() {
   PrimitiveDynObject o = (PrimitiveDynObject) eval("new String(42)");
   assertThat(o.getClassName()).isEqualTo("String");
   assertThat(o.getPrimitiveValue()).isEqualTo("42");
 }