Commit Graph
47 Commits
Author SHA1 Message Date
Zoltan Varga 52343ce767 2009-06-20 Zoltan Varga <[email protected]>
* *.cs: Convert all tests to new-style nunit classes/methods.

svn path=/trunk/mcs/; revision=136749
2009-06-24 03:37:39 +00:00
Sebastien Pouliot f6d0f0003f 2009-05-01 Sebastien Pouliot <[email protected]>
* SecurityStateTest.cs: New. Unit tests for IsStateAvailable


svn path=/trunk/mcs/; revision=133275
2009-05-01 17:54:52 +00:00
Sebastien Pouliot 96fc82589b 2008-01-02 Sebastien Pouliot <[email protected]>
* SecureStringTest.cs: Add test case for InsertAt (#350820)


svn path=/trunk/mcs/; revision=92108
2008-01-02 15:17:59 +00:00
Sebastien Pouliot dc1e155d10 2008-01-02 Sebastien Pouliot <[email protected]>
* SecureStringTest.cs: Add test cases for Copy (#350840)


svn path=/trunk/mcs/; revision=92105
2008-01-02 14:44:42 +00:00
Gert Driesen f4c61f4e5f * SecurityElementTest.cs: Allow TestToString to pass on 1.0 profile.
svn path=/trunk/mcs/; revision=89153
2007-11-07 19:25:05 +00:00
Atsushi Eno daa70f997b 2007-11-07 Atsushi Enomoto <[email protected]>
* SecurityElement.cs :
	  set_Text() should unescape the input string. get_Text() should
	  return unescaped string. It also applies to attribute value.
	  ToString() should return valid (escaped) XML.

	* SecurityElementTest.cs : enabled test for #333699 and added
	  couple more.


svn path=/trunk/mcs/; revision=89135
2007-11-07 18:07:29 +00:00
Gert Driesen 6c3dd1f940 * SecurityElementTest.cs: Added tests for using single quotes as
delimiter of which one passes on Mono and one on MS (due to bug).

svn path=/trunk/mcs/; revision=87462
2007-10-14 15:05:28 +00:00
Gert Driesen 9790712cc7 * SecurityElementTest.cs: Modified test for bug #333699 to use double
quote as delimiter to work around MS bug. Added test for bug #333725.

svn path=/trunk/mcs/; revision=87461
2007-10-14 14:40:10 +00:00
Gert Driesen 98c4e1fa83 * SecurityElement.cs: In ctors, do not assign to Tag property to
ensure exception message match that of MS. In Tag property, set name 
of parameter in ArgumentNullException and do not filter out
namespace prefixes. Modified Text property to allow null values
after change to IsValidText that no longer considers null value as
valid. Avoid NRE in Escape.
* SecurityElementTest.cs: No longer derive from Assertion. Added and
improved ctor tests. Improved AddAttribute and AddChild tests.
Added comment to mono's Attributes test and added test that passes
on MS (to track fix for MS bug). Improved IsValid* tests. Added tests
for Tag and Text. Improved FromString test to verify behavior wrt
namespace prefixes. Added test for bug #333699.

svn path=/trunk/mcs/; revision=87459
2007-10-14 13:44:48 +00:00
Sebastien Pouliot 34f6713483 2005-10-28 Sebastien Pouliot <[email protected]>
* SecureStringCas.cs: New. CAS unit tests for SecureString.
	* SecureStringTest.cs: New. Unit tests for SecureString.


svn path=/trunk/mcs/; revision=52330
2005-10-28 15:45:58 +00:00
Sebastien Pouliot 48c9b1bb38 2005-06-22 Sebastien Pouliot <[email protected]>
* CodeAccessPermissionCas.cs: New. CAS unit tests for using the
	stack modifiers (mostly assert) on permissions.
	* SecurityManagerCas.cs: New. CAS unit tests for SecurityManager.
	* SecurityManagerTest.cs: Moved a policy resolution test to 
	SecurityManagerCas as it required CheckExecutionRights to be on.


svn path=/trunk/mcs/; revision=46381
2005-06-22 18:48:21 +00:00
Sebastien Pouliot d2d73adfc2 2005-06-20 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs: Added tests for AddPermission with non-CAS 
	permissions. Added tests for ContainsNonCodeAccessPermissions.


svn path=/trunk/mcs/; revision=46250
2005-06-20 16:51:03 +00:00
Sebastien Pouliot 4e41b24b4a * PermissionSetTest.cs: Added tests for AddPermission and IsSubsetOf.
2005-06-16  Sebastien Pouliot  <[email protected]>


svn path=/trunk/mcs/; revision=46105
2005-06-16 19:32:46 +00:00
Sebastien Pouliot 7ed580e238 2005-06-16 Sebastien Pouliot <[email protected]>
* NamedPermissionSetTest.cs: Added more extensive constructor and 
	default values testing.


svn path=/trunk/mcs/; revision=46090
2005-06-16 13:14:38 +00:00
Sebastien Pouliot 2e5e5547ef 2005-06-10 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs: Added tests for GetPermission with null and 
	when using a subclass of a permission. Also some new (not working)
	tests for NET_2_0.


svn path=/trunk/mcs/; revision=45751
2005-06-10 12:28:11 +00:00
Sebastien Pouliot 25db0c94fc 2005-05-30 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs: Added unification tests for permissions inside
	an ECMA signed assembly.


svn path=/trunk/mcs/; revision=45199
2005-05-30 18:50:25 +00:00
Sebastien Pouliot 00bcb8e0d1 2005-05-28 Sebastien Pouliot <[email protected]>
* HostSecurityManagerTest.cs: Remove NotWorking from tests.


svn path=/trunk/mcs/; revision=45139
2005-05-28 14:53:50 +00:00
Sebastien Pouliot 1d6e1f0d2d 2005-05-27 Sebastien Pouliot <[email protected]>
* NamedPermissionSetTest.cs: Re-enable the "NotWorking" unit test.
	* PermissionSetCas.cs: New. Moved RevertAssert unit tests from 
	PermissionSetTest to here as they require --security to work.
	* PermissionSetTest.cs: Re-enable the "NotWorking" NET_2_0 unit tests.
	* SecurityContextCas.cs: Fixed namespace.

2005-04-28  Sebastien Pouliot  <[email protected]>


svn path=/trunk/mcs/; revision=45120
2005-05-27 18:00:19 +00:00
Sebastien Pouliot c9a9a49a83 2005-03-28 Sebastien Pouliot <[email protected]>
* SecurityContextCas.cs: New. CAS unit tests for SecurityContext.
	* SecurityContextTest.cs: New. Unit tests for SecurityContext.
	* SecurityCriticalAttributeTest.cs: New. Unit tests for 
	SecurityCriticalAttribute.
	* SecurityTransparentAttributeTest.cs: New. Unit tests for 
	SecurityTransparentAttribute.


svn path=/trunk/mcs/; revision=43720
2005-04-28 13:27:13 +00:00
Sebastien Pouliot 44c6085f95 2005-04-25 Sebastien Pouliot <[email protected]>
* HostSecurityManagerTest.cs: Renamed HostSecurityManagerFlags to 
	HostSecurityManagerOptions to match beta2.
	* PermissionSetCollectionTest.cs: Removed "set" tests for the 
	PermissionSets property (removed in beta2).


svn path=/trunk/mcs/; revision=43553
2005-04-25 17:08:17 +00:00
Sebastien Pouliot 549f571529 2005-03-31 Sebastien Pouliot <[email protected]>
* SecurityExceptionCas.cs: Added new tests for GetObjectData.


svn path=/trunk/mcs/; revision=42451
2005-03-31 21:44:57 +00:00
Sebastien Pouliot 617e3babf5 2005-01-30 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs: Changed [Ignore] to [Category("NotDotNet")] to
	reduce nunit logs.
	* SecurityElementTest.cs: Changed [Ignore] to [Category("NotDotNet")] 
	to reduce nunit logs.
	* SecurityManagerTest.cs: Changed [Ignore] to [Category("NotDotNet")] 
	to reduce nunit logs.


svn path=/trunk/mcs/; revision=39812
2005-01-30 20:22:15 +00:00
Sebastien Pouliot 10ce57b9f3 2005-01-28 Sebastien Pouliot <[email protected]>
* SecurityExceptionCas.cs: New. Permission tests for SecurityException.


svn path=/trunk/mcs/; revision=39708
2005-01-28 14:51:43 +00:00
Sebastien Pouliot 30e9c8f6ee 2005-01-19 Sebastien Pouliot <[email protected]>
* SecurityManagerTest.cs: Added new tests for 2.0. Fixed a test to work
	even if the SecurityManager.CheckExecutionRights is false.


svn path=/trunk/mcs/; revision=39191
2005-01-19 18:28:06 +00:00
Sebastien Pouliot f1ff68c0c0 * PermissionSetCollectionTest.cs: Added tests for to see if alternates
IList implementation (e.g. non-ArrayList) are supported as this 
	affects where we must check for exceptions.

svn path=/trunk/mcs/; revision=38637
2005-01-10 18:50:34 +00:00
Sebastien Pouliot d01f7544c9 2005-01-10 Sebastien Pouliot <[email protected]>
* SecurityElementTest.cs: Add new tests for 2.0 methods. Adapted 
	existing tests to deal with the fact that 2.0 doesn't indent the XML
	attributes and child elements.


svn path=/trunk/mcs/; revision=38625
2005-01-10 15:31:38 +00:00
Sebastien Pouliot cdc5c2ba5d 2005-01-09 Sebastien Pouliot <[email protected]>
* HostSecurityManagerTest.cs: New. Unit tests for HostSecurityManager.
	* PermissionSetCollectionTest.cs: New. Unit tests for PermissionSet
	Collection.


svn path=/trunk/mcs/; revision=38572
2005-01-09 23:16:10 +00:00
Sebastien Pouliot 6fff1a2333 2005-01-04 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs, SecurityManagerTest.cs: Adjusted unit tests so
	they now execute without errors on 2.0 Dec CTP.


svn path=/trunk/mcs/; revision=38311
2005-01-04 14:18:58 +00:00
Sebastien Pouliot 52690ccfd1 2003-09-01 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs: Fixed tests so they execute without errors on
	both Fx 1.1 and Fx 2.0 (beta 1).
	* SecurityManagerTest.cs: Fixed tests so they execute without errors
	on both Fx 1.1 and Fx 2.0 (beta 1).

svn path=/trunk/mcs/; revision=33186
2004-09-01 21:37:54 +00:00
Sebastien Pouliot 7650573139 2003-09-01 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs: Added tests for IsEmpty which can return true
	even when Count > 0. Added tests for FromXml to see if class names
	requires to be resolved when loaded from policy files.
	* SecurityManagerTest.cs: Minor changes to tests so they succeed with
	both Fx 1.1 and Fx 2.0 (beta 1).

svn path=/trunk/mcs/; revision=33149
2004-09-01 12:17:31 +00:00
Sebastien Pouliot 59519b935a 2003-08-31 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs: Fixed two typos than changed the behaviour of
	Intersect and RemovePermission.

svn path=/trunk/mcs/; revision=33084
2004-08-31 10:23:10 +00:00
Sebastien Pouliot 844b078b26 2003-08-30 Sebastien Pouliot <[email protected]>
* NamedPermissionTest.cs: Added unit tests for Copy(), Copy(name),
	more tests for From/ToXml and Equals/GetHashCode (for NET_2_0).
	* PermissionSetTest.cs: Added new unit tests for AddPermission,
	ContainsNonCodeAccessPermissions, partial tests for undocumented
	ConvertPermissionSet, Copy, CopyTo, GetHashCode (for NET_2_0),
	GetPermission, Intersect, IsSubset, RemovePermission, SetPermission
	and Union.

svn path=/trunk/mcs/; revision=33054
2004-08-30 18:56:33 +00:00
Sebastien Pouliot 63e416b0b9 2003-08-12 Sebastien Pouliot <[email protected]>
* SecurityManagerTest.cs: More policy resolution tests when using host
	or assembly provided evidences.

svn path=/trunk/mcs/; revision=32288
2004-08-12 22:58:25 +00:00
Sebastien Pouliot 7b75fde1e2 2003-08-04 Sebastien Pouliot <[email protected]>
* SecurityManagerTest.cs: Added more unit tests.

svn path=/trunk/mcs/; revision=31904
2004-08-04 22:11:19 +00:00
Sebastien Pouliot 7fb547a17a 2003-08-02 Sebastien Pouliot <[email protected]>
* SecurityManagerTest.cs: Added bunch of tests for null usage.
	Converted to NUnit 2.2.

svn path=/trunk/mcs/; revision=31751
2004-08-02 22:43:24 +00:00
Sebastien Pouliot b20fb36b80 2003-05-20 Sebastien Pouliot <[email protected]>
* SecurityElementTest.cs: SetUp is now public (required for new nunit).

svn path=/trunk/mcs/; revision=27794
2004-05-21 01:14:54 +00:00
Sebastien Pouliot c0b8fef831 2004-01-27 Sebastien Pouliot <[email protected]>
* SecurityElementTest.cs: Added new tests for duplicate attributes
	and multiple attribute order and ToString representation.

svn path=/trunk/mcs/; revision=22562
2004-01-28 04:41:54 +00:00
David Sheldon 68bd4245bb 2004-01-24 David Sheldon <[email protected]>
* SecurityElement.cs: Changed newline distribution in ToString.
         Matches MS better.

       * CodeAccessPermissionTest.cs (To_String): Compared
       Environment.NewLine rather than "\r\n"

svn path=/trunk/mcs/; revision=22465
2004-01-24 14:22:21 +00:00
Sebastien Pouliot 504bfb58cb 2004-01-11 Sebastien Pouliot <[email protected]>
* CodeAccessPermissionTest.cs: Fixed CustomCAS test under Windows.

svn path=/trunk/mcs/; revision=21961
2004-01-12 01:24:17 +00:00
Sebastien Pouliot 8667cf577a 2004-01-06 Sebastien Pouliot <[email protected]>
* CodeAccessPermissionTest.cs: Added a new test for calling Demand on
	custom code access permission.
	Ref: http://bugzilla.ximian.com/show_bug.cgi?id=52626
	* SecurityExceptionTest.cs: New. Unit tests for SecurityException.

svn path=/trunk/mcs/; revision=21775
2004-01-07 04:19:42 +00:00
Sebastien Pouliot bc08403e4f 2004-01-05 Sebastien Pouliot <[email protected]>
* CodeAccessPermissionTest.cs: New. Unit tests on a non-abstract
	CodeAccessPermission class.
	* SecurityManagerTest.cs: Removed .Policy from namespace.

svn path=/trunk/mcs/; revision=21734
2004-01-06 03:27:56 +00:00
Sebastien Pouliot 14c92de36a 2004-01-03 Sebastien Pouliot <[email protected]>
* SecurityManagerTest.cs: New. Added VERY minimal unit tests that I
	used to validate some behaviors.

svn path=/trunk/mcs/; revision=21667
2004-01-04 03:10:01 +00:00
Sebastien Pouliot e9e39f2c66 2004-01-02 Sebastien Pouliot <[email protected]>
* SecurityElementTest.cs: Added new tests, constructors and null
	related, and converted to NUnit2.

svn path=/trunk/mcs/; revision=21611
2004-01-03 00:58:49 +00:00
Sebastien Pouliot d1f3e6b55b 2003-06-28 Sebastien Pouliot <[email protected]>
* PermissionSetTest.cs: New. Partial unit tests for PermissionSet.
	* NamedPermissionSetTest.cs: New. Complete unit tests.

svn path=/trunk/mcs/; revision=15714
2003-06-29 00:52:38 +00:00
Nick Drochak 99a25b98bd 2002-12-21 Nick Drochak <[email protected]>
* all: make tests build and run under nunit2

svn path=/trunk/mcs/; revision=9817
2002-12-21 14:15:43 +00:00
Nick Drochak 524dcdbc17 2002-06-11 Nick Drochak <[email protected]>
* SecurityElementTest.cs: Catch and report unexpected exceptions.

svn path=/trunk/mcs/; revision=5203
2002-06-10 11:35:18 +00:00
Lawrence Pit 04dac1507b SecurityElement fixed and several methods implemented, added test unit
svn path=/trunk/mcs/; revision=4085
2002-04-27 10:49:32 +00:00