Class MkCommit

java.lang.Object
com.jcabi.github.mock.MkCommit
All Implemented Interfaces:
Commit, JsonReadable, Comparable<Commit>

@Immutable @Loggable(1) public final class MkCommit extends Object implements Commit
Mock of GitHub Commit.
Since:
0.3
  • Constructor Details

    • MkCommit

      public MkCommit(MkStorage strg, String login, Coordinates crds, String commitsha)
      Public constructor.
      Parameters:
      strg - The storage.
      login - The login name
      crds - Credential
      commitsha - Commit's sha.
      Suppressed Checkstyle violations:
      ParameterNumber (5 lines)
  • Method Details

    • repo

      public Repo repo()
      Description copied from interface: Commit
      The repo we're in.
      Specified by:
      repo in interface Commit
      Returns:
      Repo
    • sha

      public String sha()
      Description copied from interface: Commit
      SHA of it.
      Specified by:
      sha in interface Commit
      Returns:
      SHA
    • json

      public jakarta.json.JsonObject json() throws IOException
      Description copied from interface: JsonReadable
      Describe it in a JSON object.
      Specified by:
      json in interface JsonReadable
      Returns:
      JSON object
      Throws:
      IOException - If there is any I/O problem
    • compareTo

      public int compareTo(Commit commit)
      Specified by:
      compareTo in interface Comparable<Commit>