예제 #1
0
        protected override User CreateValueFromReader(IDatabaseReader reader)
        {
            var user = new User
                       (
                reader.GetInt("IDT"),
                reader.GetString("MEL"),
                reader.GetString("PWD"),
                reader.GetString("PSD"),
                reader.GetInt("AGE"),
                reader.GetString("DSC"),
                ModelEnumConverter.RoleFromString(reader.GetString("RLE")),
                reader.GetDate("CREDAT"),
                reader.GetString("PHNNBR"),
                ModelEnumConverter.UserTypeFromString(reader.GetString("TYP")),
                reader.GetDouble("USRNOT")
                       );

            user.ModificationDate = reader.GetDate("DATEFT");
            return(user);
        }
 public void RoleEnumFromString_ShouldReturnCorrectEnumValue(string role, Role expected)
 {
     Assert.AreEqual(expected, ModelEnumConverter.RoleFromString(role));
 }