Skip to content

Commit

Permalink
- fixes formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
  • Loading branch information
baywet committed Dec 14, 2023
1 parent 688f4b9 commit 50ae690
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public JsonParseNode(@Nonnull final JsonElement node) {
final JsonObject object = currentNode.getAsJsonObject();
final JsonElement childNodeElement = object.get(identifier);
if (childNodeElement == null) return null;
final JsonParseNode result = new JsonParseNode(childNodeElement);
final JsonParseNode result = new JsonParseNode(childNodeElement);
result.setOnBeforeAssignFieldValues(this.onBeforeAssignFieldValues);
result.setOnAfterAssignFieldValues(this.onAfterAssignFieldValues);
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

import static org.junit.jupiter.api.Assertions.assertNull;

import org.junit.jupiter.api.Test;

import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;

import org.junit.jupiter.api.Test;

class JsonParseNodeTests {
private static final JsonParseNodeFactory _parseNodeFactory = new JsonParseNodeFactory();
private static final JsonParseNodeFactory _parseNodeFactory = new JsonParseNodeFactory();
private static final JsonSerializationWriterFactory _serializationWriterFactory =
new JsonSerializationWriterFactory();
private static final String contentType = "application/json";
@Test
void ItDDoesNotFailForGetChildElementOnMissingKey() throws UnsupportedEncodingException
{
final var initialString = "{displayName\": \"Microsoft Teams Meeting\"}";
final var rawResponse = new ByteArrayInputStream(initialString.getBytes("UTF-8"));

@Test
void ItDDoesNotFailForGetChildElementOnMissingKey() throws UnsupportedEncodingException {
final var initialString = "{displayName\": \"Microsoft Teams Meeting\"}";
final var rawResponse = new ByteArrayInputStream(initialString.getBytes("UTF-8"));
final var parseNode = _parseNodeFactory.getParseNode(contentType, rawResponse);
final var result = parseNode.getChildNode("@odata.type");
assertNull(result);
}
}
final var result = parseNode.getChildNode("@odata.type");
assertNull(result);
}
}

0 comments on commit 50ae690

Please sign in to comment.