示例#1
0
        public void TypeProperties_Deny_Unrestricted()
        {
            HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities();
            Type t = cap.TagWriter;

            // note: right now the value is hardcoded in Mono, i.e. it doesn't come from the ini file
            Assert.IsTrue(((t == null) || (t == typeof(HtmlTextWriter))), "TagWriter");
        }
示例#2
0
        public void StringProperties_Deny_Unrestricted()
        {
            HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities();

            Assert.IsNotNull(cap.Browser, "Browser");
            Assert.IsNull(cap.Browsers, "Browsers");
            Assert.IsNotNull(cap.Platform, "Platform");
            Assert.IsNotNull(cap.Type, "Type");
            Assert.IsNotNull(cap.Version, "Version");
        }
示例#3
0
        public void GetClrVersions_Deny_Unrestricted()
        {
            HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities();

#if NET_2_0
            Assert.IsNull(cap.GetClrVersions(), "GetClrVersions");
#else
            Version[] versions = cap.GetClrVersions();
            Assert.AreEqual(1, versions.Length, "GetClrVersions");
            Assert.AreEqual("0.0", versions [0].ToString(), "Version[0]");
#endif
        }
示例#4
0
		public void StringProperties_Deny_Unrestricted ()
		{
			HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities ();
			Assert.IsNotNull (cap.Browser, "Browser");
#if NET_2_0
			Assert.IsNull (cap.Browsers, "Browsers");
#endif
			Assert.IsNotNull (cap.Platform, "Platform");
			Assert.IsNotNull (cap.Type, "Type");
			Assert.IsNotNull (cap.Version, "Version");
		}
示例#5
0
		public void GetClrVersions_Deny_Unrestricted ()
		{
			HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities ();
#if NET_2_0
			Assert.IsNull (cap.GetClrVersions (), "GetClrVersions");
#else
			Version[] versions = cap.GetClrVersions ();
			Assert.AreEqual (1, versions.Length, "GetClrVersions");
			Assert.AreEqual ("0.0", versions [0].ToString (), "Version[0]");
#endif
		}
示例#6
0
		public void TypeProperties_Deny_Unrestricted ()
		{
			HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities ();
			Type t = cap.TagWriter;
			// note: right now the value is hardcoded in Mono, i.e. it doesn't come from the ini file
			Assert.IsTrue (((t == null) || (t == typeof (HtmlTextWriter))), "TagWriter");
		}
示例#7
0
        public void GetClrVersions_Deny_Unrestricted()
        {
            HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities();

            Assert.IsNull(cap.GetClrVersions(), "GetClrVersions");
        }
		public void GetClrVersions_Deny_Unrestricted ()
		{
			HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities ();
			Assert.IsNull (cap.GetClrVersions (), "GetClrVersions");
		}