public void FromXml_WrongVersion () { IsolatedStorageFilePermission isfp = new IsolatedStorageFilePermission (PermissionState.None); SecurityElement se = isfp.ToXml (); se.Attributes.Remove ("version"); se.Attributes.Add ("version", "2"); isfp.FromXml (se); }
public void FromXml_NoVersion () { IsolatedStorageFilePermission isfp = new IsolatedStorageFilePermission (PermissionState.None); SecurityElement se = isfp.ToXml (); SecurityElement w = new SecurityElement (se.Tag); w.AddAttribute ("class", se.Attribute ("class")); isfp.FromXml (w); }
public void FromXml_NoClass () { IsolatedStorageFilePermission isfp = new IsolatedStorageFilePermission (PermissionState.None); SecurityElement se = isfp.ToXml (); SecurityElement w = new SecurityElement (se.Tag); w.AddAttribute ("version", se.Attribute ("version")); isfp.FromXml (w); // doesn't even care of the class attribute presence }
public void FromXml_WrongClass () { IsolatedStorageFilePermission isfp = new IsolatedStorageFilePermission (PermissionState.None); SecurityElement se = isfp.ToXml (); SecurityElement w = new SecurityElement (se.Tag); w.AddAttribute ("class", "Wrong" + se.Attribute ("class")); w.AddAttribute ("version", se.Attribute ("version")); isfp.FromXml (w); // doesn't care of the class name at that stage // anyway the class has already be created so... }
public void FromXml_WrongTagCase () { IsolatedStorageFilePermission isfp = new IsolatedStorageFilePermission (PermissionState.None); SecurityElement se = isfp.ToXml (); se.Tag = "IPERMISSION"; // instead of IPermission isfp.FromXml (se); }
public void FromXml_WrongTag () { IsolatedStorageFilePermission isfp = new IsolatedStorageFilePermission (PermissionState.None); SecurityElement se = isfp.ToXml (); se.Tag = "IMono"; isfp.FromXml (se); }
public void FromXml_Null () { IsolatedStorageFilePermission isfp = new IsolatedStorageFilePermission (PermissionState.None); isfp.FromXml (null); }