public void SInTests_SInEnum_IntAsString() { PatientStatus patStat = PatientStatus.Inactive; string patStatIntStr = ((int)patStat).ToString(); Assert.AreEqual(patStat, SIn.Enum <PatientStatus>(patStatIntStr, isEnumAsString: false)); }
public void SInTests_SInEnum() { ProcStat procStatus = ProcStat.EC; int procStatusInt = (int)procStatus; Assert.AreEqual(procStatus, SIn.Enum <ProcStat>(procStatusInt)); }
public void SInTests_SInEnum_AsString() { PatientStatus patStat = PatientStatus.Inactive; string patStatStr = patStat.ToString(); Assert.AreEqual(patStat, SIn.Enum <PatientStatus>(patStatStr, isEnumAsString: true)); }
public void SInTests_SInEnum_FlagsDefault() { CrudSpecialColType specialType = CrudSpecialColType.None; int specialTypeInt = (int)specialType; Assert.AreEqual(specialType, SIn.Enum(specialTypeInt, defaultEnumOption: CrudSpecialColType.TextIsClob)); }
public void SInTests_SInEnum_Flags() { CrudSpecialColType specialType = CrudSpecialColType.CleanText | CrudSpecialColType.EnumAsString; int specialTypeInt = (int)specialType; Assert.AreEqual(specialType, SIn.Enum <CrudSpecialColType>(specialTypeInt)); }
public void SInTests_SInEnum_IntNoMatch() { int patStatInt = (int)PatientStatus.Inactive + (int)PatientStatus.Prospective; Assert.AreEqual(PatientStatus.Patient, SIn.Enum(patStatInt, defaultEnumOption: PatientStatus.Patient)); }
public void SInTests_SInEnum_FlagsNoMatch() { int specialTypeInt = int.MaxValue; Assert.AreEqual(CrudSpecialColType.None, SIn.Enum(specialTypeInt, defaultEnumOption: CrudSpecialColType.None)); }