示例#1
0
        /// <inheritdoc/>
        public void SetData(XunitSerializationInfo info)
        {
            TestClass = info.GetValue <ITestClass>("TestClass");

            var methodName = info.GetString("MethodName");

            Method = TestClass.Class.GetMethod(methodName, includePrivateMethod: false);
        }
示例#2
0
        /// <inheritdoc/>
        public void SetData(XunitSerializationInfo info)
        {
            TestCollection = info.GetValue <ITestCollection>("TestCollection");

            var assemblyName = info.GetString("ClassAssemblyName");
            var typeName     = info.GetString("ClassTypeName");

            Class = Reflector.Wrap(Reflector.GetType(assemblyName, typeName));
        }
示例#3
0
        /// <inheritdoc/>
        public void SetData(XunitSerializationInfo info)
        {
            DisplayName  = info.GetString("DisplayName");
            TestAssembly = info.GetValue <ITestAssembly>("TestAssembly");
            UniqueID     = Guid.Parse(info.GetString("UniqueID"));

            var assemblyName = info.GetString("DeclarationAssemblyName");
            var typeName     = info.GetString("DeclarationTypeName");

            if (!String.IsNullOrWhiteSpace(assemblyName) && String.IsNullOrWhiteSpace(typeName))
            {
                CollectionDefinition = Reflector.Wrap(Reflector.GetType(assemblyName, typeName));
            }
        }
示例#4
0
 /// <inheritdoc/>
 public void SetData(XunitSerializationInfo data)
 {
     TestMethod          = data.GetValue <ITestMethod>("TestMethod");
     TestMethodArguments = null;
 }
 public static T GetValue <T>(this XunitSerializationInfo info, string name)
 {
     return((T)info.GetValue(name, typeof(T)));
 }
示例#6
0
 /// <inheritdoc/>
 public virtual void SetData(XunitSerializationInfo data)
 {
     TestMethod           = data.GetValue <ITestMethod>("TestMethod");
     TestMethodArguments  = null;
     DefaultMethodDisplay = (TestMethodDisplay)Enum.Parse(typeof(TestMethodDisplay), data.GetString("DefaultMethodDisplay"));
 }
示例#7
0
 /// <inheritdoc/>
 public void SetData(XunitSerializationInfo info)
 {
     FileName   = info.GetString("FileName");
     LineNumber = (int?)info.GetValue("LineNumber", typeof(int?));
 }
示例#8
0
        /// <inheritdoc/>
        public void SetData(XunitSerializationInfo data)
        {
            var testMethod = data.GetValue <ITestMethod>("TestMethod");

            Initialize(testMethod, new object[0]);
        }