Package com.linkedin.data

Examples of com.linkedin.data.DataMap.containsKey()


          toRemove.add(setFieldName);
        }
        for (String fieldToRemove: toRemove)
        {
          setFields.remove(fieldToRemove);
          if (filteredSetFields.containsKey(fieldToRemove))
          {
            setFields.put(fieldToRemove, filteredSetFields.get(fieldToRemove));
          }
        }
        if (setFields.isEmpty()) {
View Full Code Here


    assertFalse(wrapped.isValueOfClass(CustomAnyRecord.class));

    CustomAnyRecord value = new CustomAnyRecord();
    wrapped.setValue(value);

    assertTrue(map.containsKey(value.schema().getUnionMemberKey()));

    assertSame(wrapped.getValue(AnyRecord.class), value);
    assertSame(wrapped.getValue(CustomAnyRecord.class), value);

    assertTrue(wrapped.isValueOfClass(AnyRecord.class));
View Full Code Here

    Date date = new Date();

    wrapped.setValue(date);

    assertTrue(map.containsKey(date.schema().getUnionMemberKey()));

    assertSame(wrapped.getValue(Date.class), date);
    assertTrue(wrapped.isValueOfClass(Date.class));
    assertNull(wrapped.getValue(AnyRecord.class));
  }
View Full Code Here

    valRet = validateCollectionResponse(capture.getResponse(), Group.class, valOptions);
    Assert.assertNull(valRet, (valRet == null ? null : valRet.getMessages().toString()));

    capture = greetingsGenerator.action("purge", ResourceLevel.COLLECTION);
    final DataMap purgeResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(purgeResponse.containsKey("value"));

    capture = greetingsGenerator.action("updateTone", ResourceLevel.ENTITY);
    valRet = validateCollectionResponse(capture.getResponse(), Greeting.class, valOptions);
    Assert.assertNull(valRet, (valRet == null ? null : valRet.getMessages().toString()));
View Full Code Here

    request = capture.getRequest();
    Assert.assertEquals(request.getURI(), URI.create("/greeting"));

    capture = greetingGenerator.action("exampleAction", ResourceLevel.ENTITY);
    DataMap exampleActionResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(exampleActionResponse.containsKey("value"));
    request = capture.getRequest();
    Assert.assertTrue(validateUrlPath(request.getURI(), new String[]{ "greeting" }));

    capture = subgreetingsGenerator.method(ResourceMethod.CREATE);
    Assert.assertSame(capture.getResponse().getEntity().length(), 0);
View Full Code Here

    Assert.assertTrue(validateUrlPath(request.getURI(),
                                      new String[]{"greeting", "subgreetings", null, "subsubgreeting"}));

    capture = subsubgreetingGenerator.action("exampleAction", ResourceLevel.ENTITY);
    exampleActionResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(exampleActionResponse.containsKey("value"));
    request = capture.getRequest();
    Assert.assertTrue(validateUrlPath(request.getURI(),
                                      new String[]{"greeting", "subgreetings", null, "subsubgreeting"}));

    capture = subgreetingsGenerator.finder("search");
View Full Code Here

    Assert.assertTrue(queryString.contains("complexQueryParam.message="));
    Assert.assertTrue(queryString.contains("complexQueryParam.tone="));

    capture = actionsGenerator.action("echoMessageArray", ResourceLevel.COLLECTION);
    final DataMap echoMessageArrayResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(echoMessageArrayResponse.containsKey("value"));

    capture = actionsGenerator.action("echoToneArray", ResourceLevel.COLLECTION);
    final DataMap echoToneArrayResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(echoToneArrayResponse.containsKey("value"));
View Full Code Here

    final DataMap echoMessageArrayResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(echoMessageArrayResponse.containsKey("value"));

    capture = actionsGenerator.action("echoToneArray", ResourceLevel.COLLECTION);
    final DataMap echoToneArrayResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(echoToneArrayResponse.containsKey("value"));

    capture = actionsGenerator.action("echoStringArray", ResourceLevel.COLLECTION);
    final DataMap echoStringArrayResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(echoStringArrayResponse.containsKey("value"));
  }
View Full Code Here

    final DataMap echoToneArrayResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(echoToneArrayResponse.containsKey("value"));

    capture = actionsGenerator.action("echoStringArray", ResourceLevel.COLLECTION);
    final DataMap echoStringArrayResponse = DataMapUtils.readMap(capture.getResponse());
    Assert.assertTrue(echoStringArrayResponse.containsKey("value"));
  }

  private static void checkPatchMap(DataMap patchMap)
  {
    DataMap patch = patchMap.getDataMap("patch");
View Full Code Here

  private static void checkPatchMap(DataMap patchMap)
  {
    DataMap patch = patchMap.getDataMap("patch");
    Assert.assertNotNull(patch);
    Assert.assertTrue(patch.containsKey("$set"));
  }

  private static Map<String, ResourceModel> buildResourceModels(Class<?>... resourceClasses)
  {
    final Set<Class<?>> classes = new HashSet<Class<?>>(Arrays.asList(resourceClasses));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.