usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [3/4] git commit: add tests for the new Identifier change
Date Tue, 26 Nov 2013 16:35:02 GMT
add tests for the new Identifier change


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/da610bcc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/da610bcc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/da610bcc

Branch: refs/heads/maven
Commit: da610bcc2b13d4655a80259a96836a4033870d75
Parents: c2ec5a0
Author: Strong Liu <stliu@hibernate.org>
Authored: Mon Nov 25 23:36:16 2013 +0800
Committer: Strong Liu <stliu@hibernate.org>
Committed: Mon Nov 25 23:36:16 2013 +0800

----------------------------------------------------------------------
 .../org/usergrid/persistence/IdentifierIT.java  | 22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/da610bcc/stack/core/src/test/java/org/usergrid/persistence/IdentifierIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/usergrid/persistence/IdentifierIT.java b/stack/core/src/test/java/org/usergrid/persistence/IdentifierIT.java
new file mode 100644
index 0000000..3088c70
--- /dev/null
+++ b/stack/core/src/test/java/org/usergrid/persistence/IdentifierIT.java
@@ -0,0 +1,22 @@
+package org.usergrid.persistence;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+/**
+ * @author Strong Liu
+ */
+public class IdentifierIT {
+	@Test
+	public void testChineseWord(){
+		Identifier identifier = Identifier.from( "张建国" );
+		assertNotNull( identifier );
+		assertTrue( identifier.isName() );
+	}
+
+	@Test
+	public void testEmail(){
+		Identifier identifier = Identifier.from( "stliu@apache.org" );
+		assertNotNull( identifier );
+		assertTrue( identifier.isEmail() );
+	}
+}


Mime
View raw message