469,616 Members | 1,806 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

NUnitAsp System.InvalidOperationException Error

Sir,

I am new to the Nunit,nunitasp i am gettin an error as
"System.InvalidOperationException:the specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type"
i have used nunit.framework,nunitasp as references ,but when i am using txt1.tex="asdf", then i am getting can u plz send the reply as soon as possible


Expand|Select|Wrap|Line Numbers
  1.  ****************** 
  2. using System;
  3. using System.Web;
  4.  
  5. using MyMathProject;
  6. using MyWebApp;
  7.  
  8. using NUnit.Extensions;
  9. using NUnit.Extensions.Asp;
  10. using NUnit.Extensions.Asp.AspTester ;
  11. using NUnit.Extensions.Asp.HtmlTester;
  12. namespace MyMathProjectTest
  13. {
  14.     /// <summary>
  15.     /// Summary description for Class1.
  16.     /// </summary>
  17.     /// 
  18.     using NUnit.Framework;
  19.     [TestFixture]
  20.  
  21.     public class Class1: NUnit.Extensions.Asp.WebFormTestCase
  22.     {
  23.  
  24.  
  25.         public Class1()
  26.         {
  27.             //
  28.             // TODO: Add constructor logic here
  29.             //
  30.         }
  31.         [Test] public void Subtract() 
  32.         { 
  33.              //Assert.AreEqual(1.1, MyMathProject.MySimpleMath.Subtract(2.2, 1.1), "Subtraction failed"); 
  34.         } 
  35.  
  36.         [Test] public void formLayout()
  37.         {
  38.             NUnit.Extensions.Asp.AspTester.TextBoxTester txt1 = new TextBoxTester("TextBox1", CurrentWebForm); 
  39.             TextBoxTester txt2 = new TextBoxTester("TextBox2", CurrentWebForm); 
  40.             ButtonTester but1 = new ButtonTester("Button1", CurrentWebForm); 
  41.             Browser.GetPage("http://localhost/MyWebApp/Custtest.aspx");
  42.             txt1.Text="asdf";
  43.         }
  44.     }
  45.  
  46. }
  47.  
Dec 7 '05 #1
0 2212

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Carlton858 | last post: by
5 posts views Thread by Patrick.O.Ige | last post: by
2 posts views Thread by Nate | last post: by
reply views Thread by raju | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.