Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for specifying extension keywords (properties) with an "x-" prefix #1083

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Migrate away from deprecated Mockito APIs. Remove a couple unnecessar…
…y casts.
  • Loading branch information
rajpaulbagga committed Jan 27, 2020
commit d05dca643199c2f4f68877a697854e8673e9a77a
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;

public class SourceSortOrderTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jsonschema2pojo.util.NameHelper;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.ArgumentMatchers;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;

Expand Down Expand Up @@ -61,7 +61,7 @@ public void wireUpConfig() {
public void applyGeneratesUniqueEnumNamesForMultipleEnumNodesWithSameName() {

Answer<String> firstArgAnswer = new FirstArgAnswer<>();
when(nameHelper.getClassName(anyString(), Matchers.any(JsonNode.class))).thenAnswer(firstArgAnswer);
when(nameHelper.getClassName(anyString(), ArgumentMatchers.any(JsonNode.class))).thenAnswer(firstArgAnswer);
when(nameHelper.replaceIllegalCharacters(anyString())).thenAnswer(firstArgAnswer);
when(nameHelper.normalizeName(anyString())).thenAnswer(firstArgAnswer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void applyGeneratesDate() {

JType mockDateType = mock(JType.class);
FormatRule mockFormatRule = mock(FormatRule.class);
when(mockFormatRule.apply(eq("fooBar"), eq(formatNode), any(), Mockito.isA(JType.class), isNull(Schema.class))).thenReturn(mockDateType);
when(mockFormatRule.apply(eq("fooBar"), eq(formatNode), any(), Mockito.isA(JType.class), isNull())).thenReturn(mockDateType);
when(ruleFactory.getFormatRule()).thenReturn(mockFormatRule);

JType result = rule.apply("fooBar", objectNode, null, jpackage, null);
Expand Down Expand Up @@ -561,7 +561,7 @@ public void applyGeneratesArray() {

JType result = rule.apply("fooBar", objectNode, null, jpackage, null);

assertThat(result, is((JType) mockArrayType));
assertThat(result, is(mockArrayType));
}

@Test
Expand All @@ -579,7 +579,7 @@ public void applyGeneratesCustomObject() {

JType result = rule.apply("fooBar", objectNode, null, jpackage, null);

assertThat(result, is((JType) mockObjectType));
assertThat(result, is(mockObjectType));
}

@Test
Expand Down