Package com.opera.core.systems.scope.stp.services.ScopeSelftest

Examples of com.opera.core.systems.scope.stp.services.ScopeSelftest.ScopeSelftestResult


  @Test
  public void toJsonSerializesProperly() throws JSONException {
    ScopeSelftestResult.Builder builder = ScopeSelftestResult.builder();

    ScopeSelftestResult expected = (ScopeSelftestResult) builder
        .setTestName("name")
        .setGroupName("group")
        .setFileName("filename.ot")
        .setTestResult(Selftest.SelftestResult.Result.PASS)
        .setReason("reason")
        .setLineNumber(2)
        .build();

    JSONObject json = expected.toJson();

    assertEquals(expected.getTestName(), json.get("testName"));
    assertEquals(expected.getGroupName(), json.get("groupName"));
    assertEquals(expected.getFileName(), json.get("fileName"));
    assertEquals(expected.getResult(), json.get("result"));
    assertEquals(expected.getLineNumber(), json.get("lineNumber"));
  }
View Full Code Here

TOP

Related Classes of com.opera.core.systems.scope.stp.services.ScopeSelftest.ScopeSelftestResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.