ComplexPayloadEventTest.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:portals-pluto 作者:
public TestResult checkEventPayloadIsCorrect(EventRequest request,
        EventResponse response) {
    tally(response);
    TestResult result = new TestResult();
    result.setSpecPLT("15.2.2");
    result.setDescription(
            "Check to make sure that the payload carries the " +
        "proper state information from the event.");
    ComposedObject value = (ComposedObject) request.getEvent().getValue();
    if (!TEST_COLOR.equals(value.getColor())) {
        result.setReturnCode(TestResult.FAILED);
        result.setResultMessage("Expected payload color to be " + 
                TEST_COLOR + " but it was " + value.getColor());
    } else if (!TEST_POINT.equals(value.getPoint())) { 
        result.setReturnCode(TestResult.FAILED);
        result.setResultMessage("Expected payload point to be " + 
                TEST_POINT + " but it was " + value.getPoint());
    } else {
        result.setReturnCode(TestResult.PASSED);
    }
    return result;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号