Commit 1fcccadb authored by Sebastian Hans's avatar Sebastian Hans
Browse files

changes for REL-6.2.0

parent 787c8357
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -9,4 +9,36 @@ package org.etsi.scp.wg3.uicc.jcapi.userclass;
public abstract class UiccTestModel {

    public abstract boolean run();

    /**
     * Initialises the results, removing all previous results.
     */
    protected final void initialiseResults()
    {
        UiccAPITestCardService.getTheUiccTestCardService().initialiseResults();
    }

    /**
     * Adds a new result.
     */
    protected final void addResult(boolean result)
    {
        UiccAPITestCardService.getTheUiccTestCardService().addResult(result);
    }

    /**
     * Returns the overall result, based on all results submitted via {@link #addResult(boolean)}
     * since the last call to {@link #initialiseResults()}.
     * <p>
     * The following logic is used:
     * <ul>
     * <li> if no results have been submitted, <code>false</code> will be returned; </li>
     * <li> if any <code>false</code> results have been submitted, <code>false</code> will be returned; </li>
     * <li> otherwise, <code>true</code> will be returned. </li>
     * </ul>
     */
    protected final boolean getOverallResult()
    {
        return UiccAPITestCardService.getTheUiccTestCardService().getOverallResult();
    }
}
+30 −0
Original line number Diff line number Diff line
package org.etsi.scp.wg3.uicc.jcapi.userinterface;

/**
 * A service to allow results to be reported.
 */
public interface UiccResultsService
{
    /**
     * Initialises the results, removing all previous results.
     */
    public void initialiseResults();

    /**
     * Adds a new result.
     */
    public void addResult(boolean result);

    /**
     * Returns the overall result, based on all results submitted via {@link #addResult(boolean)}
     * since the last call to {@link #initialiseResults()}.
     * <p>
     * The following logic is used:
     * <ul>
     * <li> if no results have been submitted, <code>false</code> will be returned; </li>
     * <li> if any <code>false</code> results have been submitted, <code>false</code> will be returned; </li>
     * <li> otherwise, <code>true</code> will be returned. </li>
     * </ul>
     */
    public boolean getOverallResult();
}