use of com.microsoft.graph.models.DriveItemCreateUploadSessionParameterSet in project msgraph-sdk-java by microsoftgraph.
the class AdditionalDataTests method testPropsAdditionalDataOnNonIJSONObjects.
@Test
public void testPropsAdditionalDataOnNonIJSONObjects() {
final DriveItemUploadableProperties upProps = new DriveItemUploadableProperties();
upProps.name = "vacation.gif";
upProps.additionalDataManager().put("@microsoft.graph.conflictBehavior", new JsonPrimitive("rename"));
final DriveItemCreateUploadSessionParameterSet body = DriveItemCreateUploadSessionParameterSet.newBuilder().withItem(upProps).build();
String serializedObject = serializer.serializeObject(body);
assertEquals("{\"item\":{\"name\":\"vacation.gif\",\"@microsoft.graph.conflictBehavior\":\"rename\"}}", serializedObject);
}
use of com.microsoft.graph.models.DriveItemCreateUploadSessionParameterSet in project msgraph-beta-sdk-java by microsoftgraph.
the class AdditionalDataTests method testPropsAdditionalDataOnNonIJSONObjects.
@Test
public void testPropsAdditionalDataOnNonIJSONObjects() {
final DriveItemUploadableProperties upProps = new DriveItemUploadableProperties();
upProps.name = "vacation.gif";
upProps.additionalDataManager().put("@microsoft.graph.conflictBehavior", new JsonPrimitive("rename"));
final DriveItemCreateUploadSessionParameterSet body = DriveItemCreateUploadSessionParameterSet.newBuilder().withItem(upProps).build();
String serializedObject = serializer.serializeObject(body);
assertEquals("{\"item\":{\"name\":\"vacation.gif\",\"@microsoft.graph.conflictBehavior\":\"rename\"}}", serializedObject);
}
Aggregations