public void IsAutoIncrementColumn_KeyAttribute_stringType_Not() { //Arrange Entity_Not_AutoInCreament_KeyAttribute_stringType entity = new Entity_Not_AutoInCreament_KeyAttribute_stringType(); var pi = entity.GetType().GetProperty("SysNo"); //Action var actual = ReflectionHelper.IsKeyAndAutoIncrement(pi); // Assert var expected = false; Assert.AreEqual(expected, actual); }
public void SetPrimaryKey_Insert_Entity_then_Get_String_Id_Value() { //Arrange Entity_Not_AutoInCreament_KeyAttribute_stringType entity = new Entity_Not_AutoInCreament_KeyAttribute_stringType(); //Action ReflectionHelper.SetPrimaryKey(entity, 100); var actual = entity.SysNo; // Assert Assert.IsNull(actual); // var expected = null; // Assert.AreEqual(expected, actual); }