- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {SimpleDateFormat s =
String pattern;new SimpleDateFormat(pattern)
String template;Locale locale;new SimpleDateFormat(template, locale)
new SimpleDateFormat()
- Smart code suggestions by Codota
}
public ChangeRerunnable(ChangeType changeType, String schema, String objectName, String hash, String content) { this(new ChangeKey(new ObjectKey(schema, objectName, changeType), "n/a"), hash, content); }
public ChangeRerunnable(ChangeType changeType, String schema, String objectName, String changeName, String hash, String content) { this(new ChangeKey(new ObjectKey(schema, objectName, changeType), changeName), hash, content); }
public ChangeRerunnable(ChangeType changeType, String schema, String objectName, String hash, String content) { this(new ChangeKey(new ObjectKey(schema, objectName, changeType), "n/a"), hash, content); }
public ChangeRerunnable(ChangeType changeType, String schema, String objectName, String changeName, String hash, String content) { this(new ChangeKey(new ObjectKey(schema, objectName, changeType), changeName), hash, content); }
private SortableDependencyGroup newChange(String schema, String changeTypeName, String objectName, String changeName, int orderWithinObject, ImmutableSet<String> dependencies) { ChangeType changeType = mock(ChangeType.class); when(changeType.getName()).thenReturn(changeTypeName); when(changeType.isRerunnable()).thenReturn(true); SortableDependency sort = mock(SortableDependency.class); ObjectKey key = new ObjectKey(schema, objectName, changeType); when(sort.getChangeKey()).thenReturn(new ChangeKey(key, changeName)); if (dependencies != null) { when(sort.getCodeDependencies()).thenReturn(dependencies.collectWith(new Function2<String, CodeDependencyType, CodeDependency>() { @Override public CodeDependency value(String target, CodeDependencyType codeDependencyType) { return new CodeDependency(target, codeDependencyType); } }, CodeDependencyType.EXPLICIT)); } when(sort.getOrderWithinObject()).thenReturn(orderWithinObject); // to print out a nice message for the mock; we do need the string variable on a separate line String keyString = key.toString(); when(sort.toString()).thenReturn(keyString); SortableDependencyGroup depGroup = mock(SortableDependencyGroup.class); when(depGroup.getComponents()).thenReturn(Sets.immutable.<SortableDependency>with(sort)); return depGroup; } }