|
25 | 25 | import static org.junit.Assert.assertNotNull;
|
26 | 26 | import static org.junit.Assert.assertNull;
|
27 | 27 |
|
| 28 | +import java.math.BigInteger; |
28 | 29 | import java.util.Arrays;
|
29 | 30 | import java.util.Collection;
|
30 | 31 | import java.util.Date;
|
|
35 | 36 | import org.junit.runner.RunWith;
|
36 | 37 | import org.junit.runners.Parameterized;
|
37 | 38 | import org.junit.runners.Parameterized.Parameters;
|
| 39 | +import org.junit.runners.Suite; |
| 40 | +import org.junit.runners.Suite.SuiteClasses; |
38 | 41 |
|
39 | 42 | import com.redhat.lightblue.common.ldap.LdapConstant;
|
40 | 43 | import com.redhat.lightblue.common.ldap.LightblueUtil;
|
| 44 | +import com.redhat.lightblue.crud.ldap.EntryBuilderTest.ParameterizedTests; |
| 45 | +import com.redhat.lightblue.crud.ldap.EntryBuilderTest.SpecializedTests; |
41 | 46 | import com.redhat.lightblue.metadata.EntityMetadata;
|
42 | 47 | import com.redhat.lightblue.metadata.types.DateType;
|
43 | 48 | import com.redhat.lightblue.test.MetadataUtil;
|
44 | 49 | import com.redhat.lightblue.util.JsonDoc;
|
45 | 50 | import com.unboundid.ldap.sdk.Entry;
|
46 | 51 | import com.unboundid.util.StaticUtils;
|
47 | 52 |
|
| 53 | +@RunWith(Suite.class) |
| 54 | +@SuiteClasses({ParameterizedTests.class, SpecializedTests.class}) |
48 | 55 | public class EntryBuilderTest {
|
49 | 56 |
|
50 | 57 | protected static Entry buildEntry(String fieldName, String metadataType, String crudValue) throws Exception{
|
@@ -120,6 +127,10 @@ public static Collection<Object[]> data() {
|
120 | 127 | {"{\"type\": \"string\"}", quote("teststring"), "teststring"},
|
121 | 128 | {"{\"type\": \"integer\"}", "4", null},
|
122 | 129 | {"{\"type\": \"boolean\"}", "true", null},
|
| 130 | + {"{\"type\": \"bigdecimal\"}", String.valueOf(Double.MAX_VALUE), "1.7976931348623157E+308"}, |
| 131 | + {"{\"type\": \"biginteger\"}", BigInteger.ZERO.toString(), BigInteger.ZERO.toString()}, |
| 132 | + {"{\"type\": \"double\"}", String.valueOf(Double.MAX_VALUE), String.valueOf(Double.MAX_VALUE)}, |
| 133 | + {"{\"type\": \"uid\"}", quote("fake-uid"), "fake-uid"}, |
123 | 134 | {"{\"type\": \"date\"}", quote(DateType.getDateFormat().format(now)), StaticUtils.encodeGeneralizedTime(now)},
|
124 | 135 | {"{\"type\": \"binary\"}", quote(DatatypeConverter.printBase64Binary("test binary data".getBytes())), "test binary data"},
|
125 | 136 | {"{\"type\": \"array\", \"items\": {\"type\": \"string\"}}", "[\"hello\",\"world\"]", new String[]{"hello", "world"}},
|
|
0 commit comments