public void ExternalCallersFromCrossDomain_ReadOnly() { Deployment d = Deployment.Current; Assert.AreEqual(CrossDomainAccess.NoAccess, d.ExternalCallersFromCrossDomain, "Property"); CrossDomainAccess cad = (CrossDomainAccess)d.GetValue(Deployment.ExternalCallersFromCrossDomainProperty); Assert.AreEqual(CrossDomainAccess.NoAccess, cad, "GetValue/Default"); Assert.Throws <ArgumentException> (delegate { d.SetValue(Deployment.ExternalCallersFromCrossDomainProperty, cad); }, "SetValue/Default"); Assert.Throws <ArgumentException> (delegate { d.SetValue(Deployment.ExternalCallersFromCrossDomainProperty, CrossDomainAccess.NoAccess); }, "SetValue/NoAccess"); Assert.Throws <ArgumentException> (delegate { d.SetValue(Deployment.ExternalCallersFromCrossDomainProperty, CrossDomainAccess.ScriptableOnly); }, "SetValue/ScriptableOnly"); Assert.Throws <ArgumentException> (delegate { d.SetValue(Deployment.ExternalCallersFromCrossDomainProperty, (CrossDomainAccess)1); }, "SetValue/FullAccess(in beta)"); }