TemplateControlCompilerTest.cs 943 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #if NET_2_0
  2. using NunitWeb;
  3. using NUnit.Framework;
  4. using System.Web.UI.WebControls;
  5. using System.Reflection;
  6. using System.ComponentModel;
  7. using System.Threading;
  8. namespace MonoTests.System.Web.Compilation {
  9. public class ReadOnlyPropertyControl:TextBox {
  10. [Bindable (true)]
  11. public bool MyProp
  12. {
  13. get { return true; }
  14. }
  15. }
  16. [TestFixture]
  17. public class TemplateControlCompilerTest
  18. {
  19. [Test]
  20. [NUnit.Framework.Category ("NunitWeb")]
  21. public void ReadOnlyPropertyBindTest ()
  22. {
  23. Helper.Instance.CopyResource (Assembly.GetExecutingAssembly (),
  24. "ReadOnlyPropertyBind.aspx", "ReadOnlyPropertyBind.aspx");
  25. Helper.Instance.CopyResource (Assembly.GetExecutingAssembly (),
  26. "ReadOnlyPropertyControl.ascx", "ReadOnlyPropertyControl.ascx");
  27. Helper.Instance.RunUrl ("ReadOnlyPropertyBind.aspx");
  28. }
  29. [TestFixtureTearDown]
  30. public void TearDown ()
  31. {
  32. Thread.Sleep (100);
  33. Helper.Unload ();
  34. }
  35. }
  36. }
  37. #endif