Commit 28e1c5a3 authored by Ricki Hirner's avatar Ricki Hirner 🐑

Add ez-vcard tests

* upgrade gradle to 3.2.1
parent 82dd38df
Pipeline #5451653 passed with stage
in 11 minutes and 24 seconds
......@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip
......@@ -39,6 +39,7 @@ import lombok.Cleanup;
import static org.junit.Assert.*;
public class ContactTest {
private Contact parseContact(String fname, Charset charset) throws IOException {
......
/*
* Copyright © Ricki Hirner (bitfire web engineering).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
package at.bitfire.vcard4android;
import static org.junit.Assert.*;
import org.junit.Test;
import ezvcard.Ezvcard;
import ezvcard.VCard;
public class EzVCardTest {
@Test
public void testREV_UTC() {
VCard vCard = Ezvcard.parse("BEGIN:VCARD\r\n" +
"VERSION:4.0\r\n" +
"REV:20161218T201900Z\r\n" +
"END:VCARD").first();
assertNotNull(vCard.getRevision());
}
/*
SHOULD NOT FAIL, BUT FAILS: https://github.com/mangstadt/ez-vcard/issues/73
@Test
public void testREV_WithoutTZ() {
VCard vCard = Ezvcard.parse("BEGIN:VCARD\r\n" +
"VERSION:4.0\r\n" +
"REV:20161218T201900\r\n" +
"END:VCARD").first();
assertNotNull(vCard.getRevision());
}*/
/*
SHOULD NOT FAIL, BUT FAILS: https://github.com/mangstadt/ez-vcard/issues/73
@Test
public void testREV_TZHourOffset() {
VCard vCard = Ezvcard.parse("BEGIN:VCARD\r\n" +
"VERSION:4.0\r\n" +
"REV:20161218T201900-05\r\n" +
"END:VCARD").first();
assertNotNull(vCard.getRevision());
}*/
@Test
public void testREV_TZHourAndMinOffset() {
VCard vCard = Ezvcard.parse("BEGIN:VCARD\r\n" +
"VERSION:4.0\r\n" +
"REV:20161218T201900-0530\r\n" +
"END:VCARD").first();
assertNotNull(vCard.getRevision());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment