Exemplo n.º 1
0
        /// <summary>
        /// Install an extension at this extension point. If the
        /// extension node does not meet the requirements for
        /// this extension point, an exception is thrown.
        /// </summary>
        public void Install(ExtensionNode node)
        {
            if (node.Path != Path)
            {
                string msg = string.Format("Non-matching extension path. Expected {0} but got {1}.", Path, node.Path);
                throw new NUnitEngineException(msg);
            }

            // TODO: Verify that the type is correct using Cecil or Reflection
            // depending on whether the assembly is pre-loaded. For now, it's not
            // simple to verify the type without loading the extension, so we
            // let it throw at the time the object is accessed.

            Extensions.Add(node);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Install an extension at this extension point. If the
        /// extension node does not meet the requirements for
        /// this extension point, an exception is thrown.
        /// </summary>
        public void Install(ExtensionNode node)
        {
            if (node.Path != Path)
            {
                string msg = string.Format("Non-matching extension path. Expected {0} but got {1}.", Path, node.Path);
                throw new NUnitEngineException(msg);
            }

            // TODO: Verify that the type is correct using Cecil or Reflection 
            // depending on whether the assembly is pre-loaded. For now, it's not 
            // simple to verify the type without loading the extension, so we
            // let it throw at the time the object is accessed.

            Extensions.Add(node);
        }
Exemplo n.º 3
0
 public NUnit2DriverFactory(ExtensionNode driverNode)
 {
     _driverNode = driverNode;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Removes an extension from this extension point. If the
 /// extension object is not present, the method returns
 /// without error.
 /// </summary>
 public void Remove(ExtensionNode extension)
 {
     Extensions.Remove(extension);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Removes an extension from this extension point. If the
 /// extension object is not present, the method returns
 /// without error.
 /// </summary>
 public void Remove(ExtensionNode extension)
 {
     Extensions.Remove(extension);
 }
Exemplo n.º 6
0
 public NUnit2DriverFactory(ExtensionNode driverNode)
 {
     _driverNode = driverNode;
     _resolver = new ProvidedPathsAssemblyResolver();
 }