Example #1
0
        public void SInTests_SInEnum_IntAsString()
        {
            PatientStatus patStat       = PatientStatus.Inactive;
            string        patStatIntStr = ((int)patStat).ToString();

            Assert.AreEqual(patStat, SIn.Enum <PatientStatus>(patStatIntStr, isEnumAsString: false));
        }
Example #2
0
        public void SInTests_SInEnum()
        {
            ProcStat procStatus    = ProcStat.EC;
            int      procStatusInt = (int)procStatus;

            Assert.AreEqual(procStatus, SIn.Enum <ProcStat>(procStatusInt));
        }
Example #3
0
        public void SInTests_SInEnum_AsString()
        {
            PatientStatus patStat    = PatientStatus.Inactive;
            string        patStatStr = patStat.ToString();

            Assert.AreEqual(patStat, SIn.Enum <PatientStatus>(patStatStr, isEnumAsString: true));
        }
Example #4
0
        public void SInTests_SInEnum_FlagsDefault()
        {
            CrudSpecialColType specialType = CrudSpecialColType.None;
            int specialTypeInt             = (int)specialType;

            Assert.AreEqual(specialType, SIn.Enum(specialTypeInt, defaultEnumOption: CrudSpecialColType.TextIsClob));
        }
Example #5
0
        public void SInTests_SInEnum_Flags()
        {
            CrudSpecialColType specialType = CrudSpecialColType.CleanText | CrudSpecialColType.EnumAsString;
            int specialTypeInt             = (int)specialType;

            Assert.AreEqual(specialType, SIn.Enum <CrudSpecialColType>(specialTypeInt));
        }
Example #6
0
        public void SInTests_SInEnum_IntNoMatch()
        {
            int patStatInt = (int)PatientStatus.Inactive + (int)PatientStatus.Prospective;

            Assert.AreEqual(PatientStatus.Patient, SIn.Enum(patStatInt, defaultEnumOption: PatientStatus.Patient));
        }
Example #7
0
        public void SInTests_SInEnum_FlagsNoMatch()
        {
            int specialTypeInt = int.MaxValue;

            Assert.AreEqual(CrudSpecialColType.None, SIn.Enum(specialTypeInt, defaultEnumOption: CrudSpecialColType.None));
        }