Skip to content

Commit

Permalink
fix(e2e-tests): Fix file renaming Configutaion to TestConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
abhipsaMisra committed Jul 1, 2021
1 parent 23a24fc commit 72b470b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions e2e/test/iothub/command/CommandE2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static async Task DigitalTwinsSendCommandAndVerifyResponseAsync(string de
int statusCode = 0;
#if NET451

ServiceClient serviceClient = ServiceClient.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
ServiceClient serviceClient = ServiceClient.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);

logger.Trace($"{nameof(DigitalTwinsSendCommandAndVerifyResponseAsync)}: Invoke command {commandName}.");

Expand All @@ -95,7 +95,7 @@ await serviceClient.InvokeDeviceMethodAsync(

serviceClient.Dispose();
#else
DigitalTwinClient digitalTwinClient = DigitalTwinClient.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
DigitalTwinClient digitalTwinClient = DigitalTwinClient.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);

logger.Trace($"{nameof(DigitalTwinsSendCommandAndVerifyResponseAsync)}: Invoke command {commandName}.");

Expand Down
12 changes: 6 additions & 6 deletions e2e/test/iothub/properties/PropertiesE2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class PropertiesE2ETests : E2EMsTestBase
{
private readonly string _devicePrefix = $"E2E_{nameof(PropertiesE2ETests)}_";

private static readonly RegistryManager s_registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
private static readonly RegistryManager s_registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
private static readonly TimeSpan s_maxWaitTimeForCallback = TimeSpan.FromSeconds(30);

private static readonly Dictionary<string, object> s_mapOfPropertyValues = new Dictionary<string, object>
Expand Down Expand Up @@ -225,7 +225,7 @@ public static async Task Properties_DeviceSetsPropertyAndGetsItBackAsync<T>(Devi

public static async Task RegistryManagerUpdateWritablePropertyAsync<T>(string deviceId, string propName, T propValue)
{
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);

var twinPatch = new Twin();
twinPatch.Properties.Desired[propName] = propValue;
Expand Down Expand Up @@ -311,7 +311,7 @@ private async Task Properties_ServiceSetsWritablePropertyAndDeviceReceivesItOnNe
string propValue = Guid.NewGuid().ToString();

TestDevice testDevice = await TestDevice.GetTestDeviceAsync(Logger, _devicePrefix).ConfigureAwait(false);
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
using var deviceClient = DeviceClient.CreateFromConnectionString(testDevice.ConnectionString, transport);

var twinPatch = new Twin();
Expand All @@ -333,7 +333,7 @@ private async Task Properties_DeviceSetsPropertyAndServiceReceivesItAsync(Client
string propValue = Guid.NewGuid().ToString();

TestDevice testDevice = await TestDevice.GetTestDeviceAsync(Logger, _devicePrefix).ConfigureAwait(false);
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
using var deviceClient = DeviceClient.CreateFromConnectionString(testDevice.ConnectionString, transport);

var patch = new ClientPropertyCollection();
Expand All @@ -357,7 +357,7 @@ private async Task Properties_DeviceSendsNullValueForPropertyResultsServiceRemov
string propEmptyValue = "{}";

TestDevice testDevice = await TestDevice.GetTestDeviceAsync(Logger, _devicePrefix).ConfigureAwait(false);
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
using var deviceClient = DeviceClient.CreateFromConnectionString(testDevice.ConnectionString, transport);

// First send a property patch with valid values for both prop1 and prop2.
Expand Down Expand Up @@ -416,7 +416,7 @@ private async Task Properties_ClientHandlesRejectionInvalidPropertyNameAsync(Cli
string propName2 = Guid.NewGuid().ToString();

TestDevice testDevice = await TestDevice.GetTestDeviceAsync(Logger, _devicePrefix).ConfigureAwait(false);
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
using var deviceClient = DeviceClient.CreateFromConnectionString(testDevice.ConnectionString, transport);

Func<Task> func = async () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ await FaultInjection

private async Task RegistryManagerUpdateDesiredPropertyAsync(string deviceId, string propName, string propValue)
{
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);

var twinPatch = new Twin();
twinPatch.Properties.Desired[propName] = propValue;
Expand Down
12 changes: 6 additions & 6 deletions e2e/test/iothub/properties/PropertiesWithComponentsE2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class PropertiesWithComponentsE2ETests : E2EMsTestBase

private readonly string _devicePrefix = $"E2E_{nameof(PropertiesWithComponentsE2ETests)}_";

private static readonly RegistryManager s_registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
private static readonly RegistryManager s_registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
private static readonly TimeSpan s_maxWaitTimeForCallback = TimeSpan.FromSeconds(30);

private static readonly Dictionary<string, object> s_mapOfPropertyValues = new Dictionary<string, object>
Expand Down Expand Up @@ -227,7 +227,7 @@ public static async Task PropertiesWithComponents_DeviceSetsPropertyAndGetsItBac

public static async Task RegistryManagerUpdateWritablePropertyAsync<T>(string deviceId, string componentName, string propName, T propValue)
{
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);

var twinPatch = new Twin();
var componentProperties = new TwinCollection
Expand Down Expand Up @@ -318,7 +318,7 @@ private async Task PropertiesWithComponents_ServiceSetsWritablePropertyAndDevice
string propValue = Guid.NewGuid().ToString();

TestDevice testDevice = await TestDevice.GetTestDeviceAsync(Logger, _devicePrefix).ConfigureAwait(false);
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
using var deviceClient = DeviceClient.CreateFromConnectionString(testDevice.ConnectionString, transport);

var twinPatch = new Twin();
Expand All @@ -345,7 +345,7 @@ private async Task PropertiesWithComponents_DeviceSetsPropertyAndServiceReceives
string propValue = Guid.NewGuid().ToString();

TestDevice testDevice = await TestDevice.GetTestDeviceAsync(Logger, _devicePrefix).ConfigureAwait(false);
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
using var deviceClient = DeviceClient.CreateFromConnectionString(testDevice.ConnectionString, transport);

var patch = new ClientPropertyCollection();
Expand All @@ -369,7 +369,7 @@ private async Task Properties_DeviceSendsNullValueForPropertyResultsServiceRemov
string propEmptyValue = "{}";

TestDevice testDevice = await TestDevice.GetTestDeviceAsync(Logger, _devicePrefix).ConfigureAwait(false);
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
using var deviceClient = DeviceClient.CreateFromConnectionString(testDevice.ConnectionString, transport);

// First send a property patch with valid values for both prop1 and prop2.
Expand Down Expand Up @@ -444,7 +444,7 @@ private async Task PropertiesWithComponents_ClientHandlesRejectionInvalidPropert
string propName2 = Guid.NewGuid().ToString();

TestDevice testDevice = await TestDevice.GetTestDeviceAsync(Logger, _devicePrefix).ConfigureAwait(false);
using var registryManager = RegistryManager.CreateFromConnectionString(Configuration.IoTHub.ConnectionString);
using var registryManager = RegistryManager.CreateFromConnectionString(TestConfiguration.IoTHub.ConnectionString);
using var deviceClient = DeviceClient.CreateFromConnectionString(testDevice.ConnectionString, transport);

Func<Task> func = async () =>
Expand Down

0 comments on commit 72b470b

Please sign in to comment.