public void Constructor_Scope_Bad() { SecurityCriticalScope scs = (SecurityCriticalScope)UInt32.MinValue; SecurityCriticalAttribute sca = new SecurityCriticalAttribute(scs); Assert.AreEqual(SecurityCriticalScope.Explicit, sca.Scope); }
public static void InstantiateSecurityAttributes() { var t = new SecurityTreatAsSafeAttribute(); var u = new SecuritySafeCriticalAttribute(); var v = new SecurityTransparentAttribute(); var w = new SecurityCriticalAttribute(); var x = new SuppressUnmanagedCodeSecurityAttribute(); var y = new UnverifiableCodeAttribute(); var z = new AllowPartiallyTrustedCallersAttribute(); }
public void Constructor_Scope_Explicit() { SecurityCriticalAttribute sca = new SecurityCriticalAttribute(SecurityCriticalScope.Explicit); Assert.AreEqual(SecurityCriticalScope.Explicit, sca.Scope); }
public void Constructor_Scope_Everything() { SecurityCriticalAttribute sca = new SecurityCriticalAttribute(SecurityCriticalScope.Everything); Assert.AreEqual(SecurityCriticalScope.Everything, sca.Scope); }
public static void SecurityCriticalAttribute_Test() { var att = new SecurityCriticalAttribute(SecurityCriticalScope.Everything); Assert.Equal(SecurityCriticalScope.Everything, att.Scope); }