Exemple #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);
        }
Exemple #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));
        }
Exemple #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));
            }
        }
Exemple #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)));
 }
Exemple #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"));
 }
Exemple #7
0
 /// <inheritdoc/>
 public void SetData(XunitSerializationInfo info)
 {
     FileName   = info.GetString("FileName");
     LineNumber = (int?)info.GetValue("LineNumber", typeof(int?));
 }
Exemple #8
0
        /// <inheritdoc/>
        public void SetData(XunitSerializationInfo data)
        {
            var testMethod = data.GetValue <ITestMethod>("TestMethod");

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