Examples of VerifyRule


Examples of com.asakusafw.testdriver.core.VerifyRule

     * @throws Exception if occur
     */
    @Test
    public void simple() throws Exception {
        ExcelSheetRuleProvider provider = new ExcelSheetRuleProvider();
        VerifyRule rule = provider.get(SIMPLE, context(10), uri("verify/simple.xls", ":0"));
        assertThat(rule, not(nullValue()));

        assertThat(rule.getKey(obj(100, "a")), equalTo(rule.getKey(obj(100, "b"))));
        assertThat(rule.getKey(obj(100, "a")), not(equalTo(rule.getKey(obj(200, "a")))));

        assertThat(rule.verify(obj(1, "a"), obj(2, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), not(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * @throws Exception if occur
     */
    @Test
    public void integration() throws Exception {
        ExcelSheetRuleProvider provider = new ExcelSheetRuleProvider();
        VerifyRule rule = provider.get(SIMPLE, context(10), uri("it/simple.xls", ":2"));
        assertThat(rule, not(nullValue()));

        assertThat(rule.getKey(obj(100, "a")), equalTo(rule.getKey(obj(100, "b"))));
        assertThat(rule.getKey(obj(100, "a")), not(equalTo(rule.getKey(obj(200, "a")))));

        assertThat(rule.verify(obj(1, "a"), obj(2, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), not(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * @throws Exception if occur
     */
    @Test
    public void spi() throws Exception {
        VerifyRuleProvider provider = new SpiVerifyRuleProvider(ExcelSheetRuleProvider.class.getClassLoader());
        VerifyRule rule = provider.get(SIMPLE, context(10), uri("verify/simple.xls", ":0"));
        assertThat(rule, not(nullValue()));

        assertThat(rule.getKey(obj(100, "a")), equalTo(rule.getKey(obj(100, "b"))));
        assertThat(rule.getKey(obj(100, "a")), not(equalTo(rule.getKey(obj(200, "a")))));

        assertThat(rule.verify(obj(1, "a"), obj(2, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), not(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * {@link DataModelCondition} - strict.
     * @throws Exception if occur
     */
    @Test
    public void strict() throws Exception {
        VerifyRule rule = rule("verify/strict.xls");
        assertThat(rule.verify(obj(1, "a"), obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), not(nullValue()));
        assertThat(rule.verify(null, obj(1, "a")), not(nullValue()));
        assertThat(rule.verify(obj(1, "a"), null), not(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * {@link DataModelCondition} - ignore absent.
     * @throws Exception if occur
     */
    @Test
    public void ignore_absent() throws Exception {
        VerifyRule rule = rule("verify/ignore_absent.xls");
        assertThat(rule.verify(obj(1, "a"), obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), not(nullValue()));
        assertThat(rule.verify(null, obj(1, "a")), not(nullValue()));
        assertThat(rule.verify(obj(1, "a"), null), is(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * {@link DataModelCondition} - ignore unexpected.
     * @throws Exception if occur
     */
    @Test
    public void ignore_unexpected() throws Exception {
        VerifyRule rule = rule("verify/ignore_unexpected.xls");
        assertThat(rule.verify(obj(1, "a"), obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), not(nullValue()));
        assertThat(rule.verify(null, obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), null), not(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * {@link DataModelCondition} - intersect.
     * @throws Exception if occur
     */
    @Test
    public void intersect() throws Exception {
        VerifyRule rule = rule("verify/intersect.xls");
        assertThat(rule.verify(obj(1, "a"), obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), not(nullValue()));
        assertThat(rule.verify(null, obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), null), is(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * {@link DataModelCondition} - ignore unexpected.
     * @throws Exception if occur
     */
    @Test
    public void skip() throws Exception {
        VerifyRule rule = rule("verify/skip.xls");
        assertThat(rule.verify(obj(1, "a"), obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), is(nullValue()));
        assertThat(rule.verify(null, obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), null), is(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * empty property names.
     * @throws Exception if occur
     */
    @Test
    public void name_empty() throws Exception {
        VerifyRule rule = rule("verify/name_empty.xls");
        assertThat(rule.verify(obj(1, "a"), obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(1, "b")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(2, "b")), not(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.core.VerifyRule

     * {@link ValueConditionKind} - don't care.
     * @throws Exception if occur
     */
    @Test
    public void value_any() throws Exception {
        VerifyRule rule = rule("verify/value_any.xls");
        assertThat(rule.verify(obj(1, "a"), obj(1, "a")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(2, "b")), is(nullValue()));
        assertThat(rule.verify(obj(1, "a"), obj(null, null)), is(nullValue()));
        assertThat(rule.verify(null, obj(1, "a")), not(nullValue()));
        assertThat(rule.verify(obj(1, "a"), null), not(nullValue()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.