Search in sources :

Example 16 with ImmutablePair

use of org.apache.commons.lang3.tuple.ImmutablePair in project Asqatasun by Asqatasun.

the class Rgaa32016Rule010608Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //-------------------------------3NMI-01--------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa32016.Test.1.6.8-3NMI-01");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_DETAILED_DESC_DEFINITION_OF_INFORMATIVE_IMG_MSG, HtmlElementStore.CANVAS_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, "mock canvas."));
    //----------------------------------------------------------------------
    //-------------------------------3NMI-01--------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa32016.Test.1.6.8-3NMI-02");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_NATURE_OF_IMAGE_AND_DETAILED_DESC_AVAILABILITY_MSG, HtmlElementStore.CANVAS_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, "mock canvas"));
    //----------------------------------------------------------------------
    //------------------------------4NA-01------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.8-4NA-01"));
    //----------------------------------------------------------------------
    //------------------------------4NA-02---------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.8-4NA-02"));
    //----------------------------------------------------------------------
    //------------------------------4NA-03---------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.8-4NA-03"));
    //----------------------------------------------------------------------
    //------------------------------4NA-04---------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.8-4NA-04"));
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ProcessResult(org.asqatasun.entity.audit.ProcessResult)

Example 17 with ImmutablePair

use of org.apache.commons.lang3.tuple.ImmutablePair in project Asqatasun by Asqatasun.

the class Rgaa32016Rule010609Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //-------------------------------3NMI-01--------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa32016.Test.1.6.9-3NMI-01");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_AT_RESTITUTION_OF_DESC_OF_INFORMATIVE_IMG_MSG, HtmlElementStore.CANVAS_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, "mock canvas"));
    //----------------------------------------------------------------------
    //-------------------------------3NMI-01--------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa32016.Test.1.6.9-3NMI-02");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_NATURE_OF_IMAGE_AND_AT_RESTITUTION_OF_PERTINENCE_MSG, HtmlElementStore.CANVAS_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, "mock canvas"));
    //----------------------------------------------------------------------
    //------------------------------4NA-01----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.9-4NA-01"));
    //----------------------------------------------------------------------
    //------------------------------4NA-02----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.9-4NA-02"));
    //----------------------------------------------------------------------
    //------------------------------4NA-03----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.9-4NA-03"));
    //----------------------------------------------------------------------
    //------------------------------4NA-04----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.9-4NA-04"));
    //----------------------------------------------------------------------
    //------------------------------4NA-05----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.9-4NA-05"));
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ProcessResult(org.asqatasun.entity.audit.ProcessResult)

Example 18 with ImmutablePair

use of org.apache.commons.lang3.tuple.ImmutablePair in project Asqatasun by Asqatasun.

the class Rgaa32016Rule010603Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //-------------------------------3NMI-01--------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa32016.Test.01.06.03-3NMI-01");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_NATURE_OF_IMAGE_AND_DETAILED_DESC_AVAILABILITY_MSG, HtmlElementStore.EMBED_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, ""), new ImmutablePair(SRC_ATTR, "mock-embed-object.png"));
    //----------------------------------------------------------------------
    //-------------------------------3NMI-02--------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa32016.Test.01.06.03-3NMI-02");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_DETAILED_DESC_DEFINITION_OF_INFORMATIVE_IMG_MSG, HtmlElementStore.EMBED_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, ""), new ImmutablePair(SRC_ATTR, "mock-embed-object.png"));
    //----------------------------------------------------------------------
    //-------------------------------3NMI-03--------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa32016.Test.01.06.03-3NMI-03");
    checkResultIsPreQualified(processResult, 2, 2);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_DETAILED_DESC_DEFINITION_OF_INFORMATIVE_IMG_MSG, HtmlElementStore.EMBED_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, ""), new ImmutablePair(SRC_ATTR, "mock-embed-object2.png"));
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_NATURE_OF_IMAGE_AND_DETAILED_DESC_AVAILABILITY_MSG, HtmlElementStore.EMBED_ELEMENT, 2, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, ""), new ImmutablePair(SRC_ATTR, "mock-embed-object1.png"));
    //----------------------------------------------------------------------
    //------------------------------4NA-01---------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.06.03-4NA-01"));
    //----------------------------------------------------------------------
    //------------------------------4NA-02----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.06.03-4NA-02"));
    //----------------------------------------------------------------------
    //------------------------------4NA-03----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.06.03-4NA-03"));
    //----------------------------------------------------------------------
    //------------------------------4NA-03----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.06.03-4NA-04"));
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair)

Example 19 with ImmutablePair

use of org.apache.commons.lang3.tuple.ImmutablePair in project Asqatasun by Asqatasun.

the class Rgaa32016Rule010606Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //-------------------------------3NMI-01--------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa32016.Test.1.6.6-3NMI-01");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_DETAILED_DESC_DEFINITION_OF_INFORMATIVE_IMG_MSG, HtmlElementStore.SVG_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, "mock svg."));
    //----------------------------------------------------------------------
    //-------------------------------3NMI-01--------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa32016.Test.1.6.6-3NMI-02");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, RemarkMessageStore.CHECK_NATURE_OF_IMAGE_AND_DETAILED_DESC_AVAILABILITY_MSG, HtmlElementStore.SVG_ELEMENT, 1, new ImmutablePair(HtmlElementStore.TEXT_ELEMENT2, "mock svg."));
    //----------------------------------------------------------------------
    //------------------------------4NA-01------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.6-4NA-01"));
    //----------------------------------------------------------------------
    //------------------------------4NA-02---------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.6-4NA-02"));
    //----------------------------------------------------------------------
    //------------------------------4NA-03---------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.6-4NA-03"));
    //----------------------------------------------------------------------
    //------------------------------4NA-04---------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.1.6.6-4NA-04"));
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ProcessResult(org.asqatasun.entity.audit.ProcessResult)

Example 20 with ImmutablePair

use of org.apache.commons.lang3.tuple.ImmutablePair in project Asqatasun by Asqatasun.

the class Rgaa32016Rule010312Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------3NMI-01---------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa32016.Test.01.03.08-3NMI-01");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, CHECK_NATURE_OF_IMAGE_AND_AT_RESTITUTION_OF_ALTERNATIVE_MSG, CANVAS_ELEMENT, 1, new ImmutablePair(TEXT_ELEMENT2, "Un text"));
    //----------------------------------------------------------------------
    //------------------------------3NMI-02---------------------------------
    processResult = processPageTest("Rgaa32016.Test.01.03.08-3NMI-02");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, CHECK_AT_RESTITUTION_OF_ALTERNATIVE_OF_INFORMATIVE_IMAGE_MSG, CANVAS_ELEMENT, 1, new ImmutablePair(TEXT_ELEMENT2, "Un text"));
    //----------------------------------------------------------------------
    //------------------------------3NMI-03---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa32016.Test.01.03.08-3NMI-03");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, CHECK_AT_RESTITUTION_OF_ALTERNATIVE_OF_INFORMATIVE_IMAGE_MSG, CANVAS_ELEMENT, 1, new ImmutablePair(TEXT_ELEMENT2, "Un text"));
    //----------------------------------------------------------------------
    //------------------------------3NMI-04---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa32016.Test.01.03.08-3NMI-04");
    checkResultIsPreQualified(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.NEED_MORE_INFO, CHECK_AT_RESTITUTION_OF_ALTERNATIVE_OF_INFORMATIVE_IMAGE_MSG, CANVAS_ELEMENT, 1, new ImmutablePair(TEXT_ELEMENT2, "Un text"));
    //----------------------------------------------------------------------
    //------------------------------4NA-01----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.03.08-4NA-01"));
    //----------------------------------------------------------------------
    //------------------------------4NA-02----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.03.08-4NA-02"));
    //----------------------------------------------------------------------
    //------------------------------4NA-03----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.03.08-4NA-03"));
    //----------------------------------------------------------------------
    //------------------------------4NA-04----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.03.08-4NA-04"));
    //----------------------------------------------------------------------
    //------------------------------4NA-05----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa32016.Test.01.03.08-4NA-05"));
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ProcessResult(org.asqatasun.entity.audit.ProcessResult)

Aggregations

ImmutablePair (org.apache.commons.lang3.tuple.ImmutablePair)415 ProcessResult (org.asqatasun.entity.audit.ProcessResult)125 Pair (org.apache.commons.lang3.tuple.Pair)65 ArrayList (java.util.ArrayList)64 Map (java.util.Map)39 HashMap (java.util.HashMap)36 List (java.util.List)35 Collectors (java.util.stream.Collectors)34 IOException (java.io.IOException)30 Test (org.junit.Test)27 ElementChecker (org.asqatasun.rules.elementchecker.ElementChecker)21 IntStream (java.util.stream.IntStream)20 File (java.io.File)19 java.util (java.util)18 ElementPresenceChecker (org.asqatasun.rules.elementchecker.element.ElementPresenceChecker)18 Set (java.util.Set)16 VisibleForTesting (com.google.common.annotations.VisibleForTesting)14 INDArray (org.nd4j.linalg.api.ndarray.INDArray)14 Collections (java.util.Collections)13 UserException (org.broadinstitute.hellbender.exceptions.UserException)11