public void ReaderLambdaReadsByteEnumFromProperty()
 {
     var obj = new ByteEnumClass()
     {
         Enum = ByteEnum.ValueOne
     };
     var propertyInfo = obj.GetType().GetProperties().Single();
     var function = _lambdaGenerator.CreateReaderFunction<ByteEnumClass, ByteEnum>(propertyInfo);
     Assert.AreEqual(obj.Enum, function(obj));
 }
        public void EnumLambdaAssignsToByteEnumProperty()
        {
            var obj = new ByteEnumClass()
            {
                Enum = ByteEnum.ValueOne
            };
            var propertyInfo = obj.GetType().GetProperties().Single();
            var function = _lambdaGenerator.CreateAssignmentFunctionWithCast<ByteEnumClass, Enum>(propertyInfo);

            function(obj, ByteEnum.ValueTwo);

            Assert.AreEqual(ByteEnum.ValueTwo, obj.Enum);
        }