forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional code coverage in System.Text.Json - no public constructors (…
…dotnet#33137) * added tests for concurrent collection private constructors * added tests for non generic collection private constructors * added tests for generic collection private constructors * added additional test for read only dictionary private constructor * fixed location of compile directive * added assertion for exception messages * added additional assertions for exception messages * using [Theory] tests to reduce LoC * using [Theory] for additional tests * reordered files in test project * added internal ctor tests
- Loading branch information
Showing
7 changed files
with
289 additions
and
22 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/libraries/System.Text.Json/tests/Serialization/TestClasses.ConcurrentCollections.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Collections.Concurrent; | ||
|
||
namespace System.Text.Json.Serialization.Tests | ||
{ | ||
public class GenericConcurrentQueuePrivateConstructor<T> : ConcurrentQueue<T> | ||
{ | ||
private GenericConcurrentQueuePrivateConstructor() { } | ||
} | ||
|
||
public class GenericConcurrentQueueInternalConstructor<T> : ConcurrentQueue<T> | ||
{ | ||
internal GenericConcurrentQueueInternalConstructor() { } | ||
} | ||
|
||
public class GenericConcurrentStackPrivateConstructor<T> : ConcurrentStack<T> | ||
{ | ||
private GenericConcurrentStackPrivateConstructor() { } | ||
} | ||
|
||
public class GenericConcurrentStackInternalConstructor<T> : ConcurrentStack<T> | ||
{ | ||
internal GenericConcurrentStackInternalConstructor() { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.