- if (keyName.startsWith("lfnint") || keyName.startsWith("lfnuint")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.NUMBER, peek);
- try {
- jReader.nextLong();
- } catch (NumberFormatException e) {
- assertTrue("Key " + keyName + " has incorrect value - " + e.getMessage(), false);
- }
- loadedLfs.add(keyName.substring(3));
- } else if (keyName.equals("identityref1")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.STRING, peek);
- assertEquals("simple-data-types:iden", jReader.nextString());
- lfidentityrefChecked = true;
- } else if (keyName.equals("lfstr")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.STRING, peek);
- assertEquals("lfstr", jReader.nextString());
- lfstrChecked = true;
- } else if (keyName.equals("lfstr1")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.STRING, peek);
- assertEquals("", jReader.nextString());
- lfstr1Checked = true;
- } else if (keyName.equals("lfbool1")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.BOOLEAN, peek);
- assertEquals(true, jReader.nextBoolean());
- lfbool1Checked = true;
- } else if (keyName.equals("lfbool2")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.BOOLEAN, peek);
- assertEquals(false, jReader.nextBoolean());
- lfbool2Checked = true;
- } else if (keyName.equals("lfbool3")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.BOOLEAN, peek);
- assertEquals(false, jReader.nextBoolean());
- } else if (keyName.equals("lfdecimal1")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.NUMBER, peek);
- assertEquals(new Double(43.32), (Double) jReader.nextDouble());
- lfdecimal1Checked = true;
- } else if (keyName.equals("lfdecimal2")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.NUMBER, peek);
- assertEquals(new Double(-0.43), (Double) jReader.nextDouble());
- lfdecimal2Checked = true;
- } else if (keyName.equals("lfdecimal3")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.NUMBER, peek);
- assertEquals(new Double(43), (Double) jReader.nextDouble());
- lfdecimal3Checked = true;
- } else if (keyName.equals("lfdecimal4")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.NUMBER, peek);
- assertEquals(new Double(43E3), (Double) jReader.nextDouble());
- lfdecimal4Checked = true;
- } else if (keyName.equals("lfdecimal6")) {
- assertEquals("Key " + keyName + " has incorrect type", JsonToken.NUMBER, peek);
- assertEquals(new Double(33.12345), (Double) jReader.nextDouble());
- lfdecimal6Checked = true;
- } else if (keyName.equals("lfenum")) {
- assertEquals("enum3", jReader.nextString());
- enumChecked = true;
- } else if (keyName.equals("lfbits")) {
- assertEquals("bit3 bit2", jReader.nextString());
- bitsChecked = true;
- } else if (keyName.equals("lfbinary")) {
- assertEquals("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", jReader.nextString());
- lfbinaryChecked = true;
- } else if (keyName.equals("lfempty")) {
- jReader.beginArray();
- jReader.nextNull();
- jReader.endArray();
- lfemptyChecked = true;
- } else if (keyName.startsWith("lfunion")) {
- checkLfUnion(jReader, keyName, peek);
- } else {
- assertTrue("Key " + keyName + " doesn't exists in yang file.", false);