Commit Graph
18 Commits
Author SHA1 Message Date
madmir 018e1b82e8 Re-enable xunit warning 2017 (dotnet/corefx#40467)
* Re-enable xunit warning 2017

Use specialized assertions for checking for elements in collections.

* Revert Re-enable xunit warning 2017, revert some test changes

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/2fc48e13e87a4e68576d7df7af420ac2874e929e
2019-08-22 10:17:26 -04:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Ganbarukamo41 9be9c570be Enable analyzer for xUnit2000 (Constants and literals should be the expected argument) (dotnet/corefx#39842)
* Enable xUnit2000 analyzer

This commit enables xUnit2000 (Constants and literals should be the expected argument) and apply fixes for the existing violating codes.
* a Massive commit fixing xUnit2000
* fixing some 2003 errors

* Fix mistakes

* Fix missed errors for unix


Commit migrated from https://github.com/dotnet/corefx/commit/93d7aa1c1737b6da29d04b78557215e18eb786d4
2019-07-28 15:47:52 -07:00
Viktor Hofer 3b96075cb0 Enable xunit2012 analyzer (dotnet/corefx#39730)
Commit migrated from https://github.com/dotnet/corefx/commit/722ab9b7303ef14db74a1d09d464d180f18f512b
2019-07-24 18:20:57 +02:00
Stephen Toub cd3ca6f991 Re-enable xunit warning 2004 (dotnet/corefx#39698)
* Replace "Assert.Equal(true, " with "Assert.True("

* Replace "Assert.Equal(false, " with "Assert.False("

And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.

* Replace "Assert.StrictEqual(true, " with "Assert.True("

* Revert a few changes where true/false was being compared to object

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
2019-07-23 17:05:15 -04:00
Jeremy Kuhne a94caf1d0f Expose SecurityDescriptor as protected (dotnet/corefx#38283)
* Expose SecurityDescriptor as protected

Classes derived from ObjectSecurity depended on seeing the _securityDescriptor field, which is marked internal. Internal visibility no longer works as types have split into different assemblies and is causing failures, such as dotnet/corefx#35993.

This change also ran the UpdateVSConfigurations target on the changed libraries.

* Address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/7570445805fe57966ff6494fcd582de8b79088a0
2019-06-06 15:16:53 -07:00
Viktor Hofer a177aa4888 Promote tests to netstandard (dotnet/corefx#31966)
* Promote tests to netstandard

* Disable uap test run

* Uncomment constant define, file condition positive

* Disable failing uap tests


Commit migrated from https://github.com/dotnet/corefx/commit/559d5401e6bb8a487ff499f4beff5bf5d83961a3
2018-08-27 20:03:05 +02:00
Stephen Toub 4c9eb2ec25 Simplify built-in types across corefx tests (dotnet/corefx#30660)
Commit migrated from https://github.com/dotnet/corefx/commit/7ae1a252d7e68c5513d2658de7a401c37e9b0504
2018-06-25 22:42:04 -07:00
Anirudh Agnihotry 8ad804ff47 Fixed tests for non english windows (dotnet/corefx#28865)
Commit migrated from https://github.com/dotnet/corefx/commit/5d2fd5bd2dfeed003892849a8d85f2506a922c36
2018-04-05 16:30:09 -07:00
Alexander Radchenko 58b609b6b8 Fixed System.IO.FileSystem.AccessControl.Tests fails on non-English Windows (dotnet/corefx#28405)
* Fixed  System.IO.FileSystem.AccessControl.Tests fails on non-English Windows

* Use WellKnownSidType


Commit migrated from https://github.com/dotnet/corefx/commit/56f02f35235606415c8773be6d8c26e41653c767
2018-03-28 11:10:36 -07:00
Stephen Toub e5ff70defe Fix some license headers across the repo (dotnet/corefx#27039)
Commit migrated from https://github.com/dotnet/corefx/commit/7f19e761b7400521030707df2e6fac10daa36f26
2018-02-11 08:55:26 -05:00
Marco Rossignoli 1a50b0c324 "Don't directly throw Exception" System.IO.FileSystem.AccessControl (dotnet/corefx#25696)
* Fix throw new Exception();

* Fix throw new Exception()

* Fix throw new Exception();

* Fix throw new Exception();

* Fix throw new Exception();

* Fix throw new Exception();

* Fix throw new Exception();

* Don't directly throw Exception

* test RemoveAccessRuleAll_AccessControlType_Deny_ThrowException and throw  InvalidOperationException

* change exception message

* add more descriptive exception message


Commit migrated from https://github.com/dotnet/corefx/commit/a09877081b654b5be925106ab63f0dd3f64e680a
2018-01-02 09:46:40 -08:00
Santiago Fernandez Madero 00b43c6514 Fix System.DirectoryServices configurations and generate PNS assembly correctly for UAP (dotnet/corefx#24878)
* Fix System.DirectoryServices configurations and generate PNS assembly correctly

* Fix CI adding UapVNext as a target framework for the pkg

* Fix configurations to be PNSE when targeting netstandard or any non-windows configuration

* Disable test that is using DirectoryServices and is getting PNSE


Commit migrated from https://github.com/dotnet/corefx/commit/3be15ca3d519fafc149c08b20727f88cb0f76e6a
2017-10-31 16:14:22 -07:00
Root 23c89e17a5 Refactored the code.
Commit migrated from https://github.com/dotnet/corefx/commit/0ec121ed13001174730d32f302e03d81f3a01899
2017-07-23 22:50:19 +02:00
Root eee9add246 Added new test cases for the "DirectoryObjectSecurity" Class.
Commit migrated from https://github.com/dotnet/corefx/commit/5c4d1529778082cca8719afae7a574b6c0f123c0
2017-07-08 21:49:44 +02:00
Hugh Bellamy 7c660f36bb Update remaining argument*exceptions to have param names (dotnet/corefx#21650)
Commit migrated from https://github.com/dotnet/corefx/commit/ea1bc38c237dfb768e7d442efa95cab785e89ac3
2017-06-28 06:44:57 -07:00
Hugh Bellamy 7cbcd5ed85 Convert most Assert.Throws<ArgumentException> without param name to AssertExtensions (dotnet/corefx#21455)
* Registry

* Collections

* ComponentModel

* Configuration

* Data

* Globalization

* Drawing

* Diagnostics

* IO

* Linq

* Add System.Net param names in tests

* Move ArgumentExceptions in System.Private.Xml to AssertExtensions

* Add System.Reflection.* ArgumentException param names

* Add param names for System.Runtime* ArgumentExceptions

* Add ArgumentException param names to System.Security.*

* Add ArgumentException param names to System.Text.*

* Add param names to ArgumentExceptions in misc projects

* Add System.Threading.* ArgumentException param names

* Fix missing files

* Fixes for unix and netfx

* Fix more failures and revert a IdnaConformance tests to avoid merge conflicts with dotnet/corefx#21463


Commit migrated from https://github.com/dotnet/corefx/commit/59915687bb261efeae70565d0ca8990ac45ceb9c
2017-06-23 12:33:47 -07:00
8to5Developer bc3a5de554 Improve code coverage of System.IO.FileSystem.AccessControl (35.7%) (dotnet/corefx#20680)
* -Added new classes to handle the unit tests for the following libraries:
 FileSysyemAuditRule.CS
 DirectoryObjectSecurity.CS
-Added new unit tests to the 'FileSystemAclExtensionsTests.cs' class

* updated the files according to the suggested code standards for test cases.

* updated the file according to the suggested code standards.

* Updated some of the test cases and ran the CodeFormatter tool.

* Removed the invalid terms in the code.


Commit migrated from https://github.com/dotnet/corefx/commit/12d25b0445f67ac299de5abb2af7af767c135c88
2017-06-12 18:23:15 -07:00