You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by st...@apache.org on 2013/11/26 17:35:02 UTC

[3/4] git commit: add tests for the new Identifier change

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 <st...@hibernate.org>
Authored: Mon Nov 25 23:36:16 2013 +0800
Committer: Strong Liu <st...@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() );
+	}
+}