Exemple #1
0
        public void GetParamValue_ReturnsUnderlyingValue_WhenPassedValidNullable(string value, dynamic expected, Type type)
        {
            var service = new ParameterService();
            var val     = service.GetParamValue(value, type);

            Assert.AreEqual(expected, val);
        }
Exemple #2
0
        public void GetParamValue_ReturnsEnum_WhenPassedValidEnum()
        {
            var service = new ParameterService();
            var val     = service.GetParamValue("EnumOne", typeof(SampleEnum));

            Assert.AreEqual(SampleEnum.EnumOne, val);
        }