public ValueTypeDeserializer(Type type, ValueTypeDeserializerHelper helper = null)
        {
            if (type == null)
                throw new ArgumentNullException("type");

            _type = type;
            _helper = helper ?? new ValueTypeDeserializerHelper();
        }
        public void TestDeserializeFromValue(object expectedValue)
        {
            var helper = new ValueTypeDeserializerHelper();

            string value = new XElement("value", expectedValue).Value;
            Type type = expectedValue.GetType();

            IObjectContext actual = helper.DeserializeFromValue(value, type);

            Assert.IsFalse(actual.Attributes.Any());
            Assert.IsFalse(actual.Members.Any());

            Assert.AreEqual(expectedValue, actual.GetObject());
            Assert.AreEqual(type, actual.Type);
        }