Example usage for org.eclipse.jgit.lib PersonIdent toString

List of usage examples for org.eclipse.jgit.lib PersonIdent toString

Introduction

In this page you can find the example usage for org.eclipse.jgit.lib PersonIdent toString.

Prototype

@Override
@SuppressWarnings("nls")
public String toString() 

Source Link

Usage

From source file:com.google.gitiles.DateFormatterTest.java

License:Open Source License

private PersonIdent newIdent(String whenStr, String tzStr) throws ParseException {
    whenStr += " " + tzStr;
    Date when = GitDateParser.parse(whenStr, null);
    TimeZone tz = getTimeZone("GMT" + tzStr);
    PersonIdent ident = new PersonIdent("A User", "user@example.com", when, tz);
    // PersonIdent.toString() uses its own format with "d" instead of "dd",
    // hence the mismatches in 2 vs. 02 above. Nonetheless I think this sanity
    // check is useful enough to keep around.
    assertEquals("PersonIdent[A User, user@example.com, " + whenStr + "]", ident.toString());
    return ident;
}