-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactored unit tests: * Disabled parallelization, and moved logging functionality to TestUtility. * Added a test attribute that will log the begining/end of each test along with the current platform * Added permutations for authenticated/unauthenticated entities * Updating connection string environment variable name * Added back base test class, and added new class for raw web socket tests * Removing unnecessary constructors, and adding comment to explain the compiler directive
- Loading branch information
1 parent
1583957
commit b95dae6
Showing
13 changed files
with
661 additions
and
660 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.Azure.Relay.UnitTests | ||
{ | ||
static class Constants | ||
{ | ||
internal const string ConnectionStringEnvironmentVariable = "azure-relay-dotnet/connectionstring"; | ||
internal const string AuthenticatedEntityPath = "authenticated"; | ||
internal const string UnauthenticatedEntityPath = "unauthenticated"; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
test/Microsoft.Azure.Relay.UnitTests/DisplayTestNameAttribute.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,24 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.Azure.Relay.UnitTests | ||
{ | ||
using System.Reflection; | ||
using Microsoft.Extensions.PlatformAbstractions; | ||
using Xunit.Sdk; | ||
|
||
public class DisplayTestMethodNameAttribute : BeforeAfterTestAttribute | ||
{ | ||
public override void Before(MethodInfo methodUnderTest) | ||
{ | ||
TestUtility.Log($"Begin {methodUnderTest.DeclaringType}.{methodUnderTest.Name} on {PlatformServices.Default.Application.RuntimeFramework.ToString()}"); | ||
base.Before(methodUnderTest); | ||
} | ||
|
||
public override void After(MethodInfo methodUnderTest) | ||
{ | ||
TestUtility.Log($"End {methodUnderTest.DeclaringType}.{methodUnderTest.Name}"); | ||
base.After(methodUnderTest); | ||
} | ||
} | ||
} |
Oops, something went wrong.