Inheritance: System.Attribute
コード例 #1
0
		public void PlatformAttribute_InvalidPlatform()
		{
			PlatformAttribute attr = new PlatformAttribute( "Net-1.0,Net11,Mono" );
			Assert.IsFalse( winXPHelper.IsPlatformSupported( attr ) );
			Assert.AreEqual( "Invalid platform name: Net11", winXPHelper.Reason );
		}
コード例 #2
0
		public void PlatformAttribute_IncludeAndExclude()
		{
			PlatformAttribute attr = new PlatformAttribute( "Win2K,WinXP,NT4" );
			attr.Exclude = "Mono";
			Assert.IsFalse( win95Helper.IsPlatformSupported( attr ) );
			Assert.AreEqual( "Only supported on Win2K,WinXP,NT4", win95Helper.Reason );
			Assert.IsTrue( winXPHelper.IsPlatformSupported( attr ) );
			attr.Exclude = "Net";
			Assert.IsFalse( win95Helper.IsPlatformSupported( attr ) );
			Assert.AreEqual( "Only supported on Win2K,WinXP,NT4", win95Helper.Reason );
			Assert.IsFalse( winXPHelper.IsPlatformSupported( attr ) );
			Assert.AreEqual( "Not supported on Net", winXPHelper.Reason );
		}