// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using NUnit.Framework;
using System;
using System.Security;
[TestFixture]
public class SecurityCriticalAttributeTest {
-
+#if !MOBILE
[Test]
public void Constructor_Default ()
{
SecurityCriticalAttribute sca = new SecurityCriticalAttribute (scs);
Assert.AreEqual (SecurityCriticalScope.Explicit, sca.Scope);
}
-
+#endif
[Test]
public void Attributes ()
{
AttributeUsageAttribute aua = (AttributeUsageAttribute)attrs [0];
Assert.IsFalse (aua.AllowMultiple, "AllowMultiple");
Assert.IsFalse (aua.Inherited, "Inherited");
+#if NET_4_0 && !MOBILE
+ AttributeTargets at = (AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Delegate);
+#else
AttributeTargets at = (AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate);
+#endif
Assert.AreEqual (at, aua.ValidOn, "ValidOn");
}
}
}
-
-#endif