Search in sources :

Example 1 with EditHeaderExtension

use of com.zimbra.cs.filter.jsieve.EditHeaderExtension in project zm-mailbox by Zimbra.

the class ReplaceHeaderTest method testNonAsciiHeaderNameWithoutOperation.

@Test
public void testNonAsciiHeaderNameWithoutOperation() {
    EditHeaderExtension ext = new EditHeaderExtension();
    ext.setKey("日本語ヘッダ名");
    try {
        ext.commonValidation(null);
    } catch (SyntaxException e) {
        Assert.assertEquals("EditHeaderExtension:Header name must be printable ASCII only.", e.getMessage());
    }
}
Also used : EditHeaderExtension(com.zimbra.cs.filter.jsieve.EditHeaderExtension) SyntaxException(org.apache.jsieve.exception.SyntaxException) Test(org.junit.Test)

Example 2 with EditHeaderExtension

use of com.zimbra.cs.filter.jsieve.EditHeaderExtension in project zm-mailbox by Zimbra.

the class ReplaceHeaderTest method testNonAsciiHeaderName.

@Test
public void testNonAsciiHeaderName() {
    EditHeaderExtension ext = new EditHeaderExtension();
    ext.setKey("日本語ヘッダ名");
    try {
        ext.commonValidation("ReplaceHeader");
    } catch (SyntaxException e) {
        Assert.assertEquals("ReplaceHeader:Header name must be printable ASCII only.", e.getMessage());
    }
}
Also used : EditHeaderExtension(com.zimbra.cs.filter.jsieve.EditHeaderExtension) SyntaxException(org.apache.jsieve.exception.SyntaxException) Test(org.junit.Test)

Aggregations

EditHeaderExtension (com.zimbra.cs.filter.jsieve.EditHeaderExtension)2 SyntaxException (org.apache.jsieve.exception.SyntaxException)2 Test (org.junit.Test)2