public void Test_0601_SetGlobalPhone_Invalid() { string identifier = "kii1234"; string phone = "09011112222"; KiiUser.Builder builder = KiiUser.BuilderWithIdentifier(identifier); builder.SetGlobalPhone(phone); }
public void Test_SetGlobalPhone() { string identifier = "kii1234"; string phone = "+8719011112222"; KiiUser.Builder builder = KiiUser.BuilderWithIdentifier(identifier); builder.SetGlobalPhone(phone); builder.Build().Register("123456"); KiiUser user = KiiUser.CurrentUser; Assert.AreEqual(identifier, user.Username); Assert.IsNull(user.Email); Assert.AreEqual(phone, user.Phone); Assert.IsNull(user.Country); }
public void Test_0600_SetGlobalPhone_OK() { string local = "09011112222"; string country = "JP"; string global = "+819011112222"; KiiUser.Builder builder = KiiUser.BuilderWithLocalPhone(local, country); KiiUser user1 = builder.Build(); Assert.IsNull(user1.Username); Assert.IsNull(user1.Email); Assert.AreEqual(local, user1.Phone); Assert.AreEqual(country, user1.Country); builder.SetGlobalPhone(global); KiiUser user2 = builder.Build(); Assert.IsNull(user2.Username); Assert.IsNull(user2.Email); Assert.AreEqual(global, user2.Phone); Assert.IsNull(user2.Country); }