Exemplo n.º 1
0
        public void Add(XunitTestClassTask classTask)
        {
            var key = classTask.TypeName;

            lock (lockObject)
            {
                if (!tasksByClassName.ContainsKey(key))
                    tasksByClassName.Add(key, new RemoteTaskWrapper(classTask, server));
            }
        }
Exemplo n.º 2
0
        public Method(Class typeInfo, XunitTestClassTask classTask, string methodName, Action<object[]> methodBody, Parameter[] parameters, Attribute[] attributes)
        {
            @class = typeInfo;
            Name = methodName;
            Task = new XunitTestMethodTask(classTask.AssemblyLocation, classTask.TypeName, methodName, true, false);
            body = methodBody;
            this.parameters = parameters;
            this.attributes = attributes;

            TheoryTasks = GetTheoryTasks();
        }
Exemplo n.º 3
0
        public Method(Class typeInfo, XunitTestClassTask classTask, string methodName, Action <object[]> methodBody, Parameter[] parameters, Attribute[] attributes)
        {
            @class          = typeInfo;
            Name            = methodName;
            Task            = new XunitTestMethodTask(classTask.AssemblyLocation, classTask.TypeName, methodName, true, false);
            body            = methodBody;
            this.parameters = parameters;
            this.attributes = attributes;

            TheoryTasks = GetTheoryTasks();
        }
Exemplo n.º 4
0
        public Class(string typeName, string assemblyLocation = "assembly1.dll")
        {
            var typeShortName = typeName.Split('.').Last();
            var typeNamespace = typeName.Replace("." + typeShortName, "");

            fakeType = new FakeType(typeNamespace, typeShortName);

            ClassTask = new XunitTestClassTask(assemblyLocation, typeName, true);
            methods   = new List <Method>();
            SetConstructor(() => { });
            attributes = new List <Attribute>();
        }
Exemplo n.º 5
0
 private static bool IsParentClassTask(XunitTestClassTask classTask, XunitTestMethodTask methodTask)
 {
     return(classTask.AssemblyLocation == methodTask.AssemblyLocation &&
            classTask.TypeName == methodTask.TypeName);
 }
 public ReSharperRunnerLogger(IRemoteTaskServer server, XunitTestClassTask classTask)
 {
     this.server = server;
     this.classTask = classTask;
 }
 private static bool IsParentClassTask(XunitTestClassTask classTask, XunitTestMethodTask methodTask)
 {
     return classTask.AssemblyLocation == methodTask.AssemblyLocation
         && classTask.TypeName == methodTask.TypeName;
 }
Exemplo n.º 8
0
 private void AddMethod(XunitTestClassTask classTask, XunitTestMethodTask methodTask)
 {
     methodTasks[classTask.TypeName].Add(methodTask);
 }
Exemplo n.º 9
0
 private void AddClass(XunitTestClassTask classTask)
 {
     classTasks.Add(classTask.TypeName, classTask);
     methodTasks.Add(classTask.TypeName, new List<XunitTestMethodTask>());
 }