Skip to content

Commit

Permalink
Enrollment group creation based on device ModelId instead of ModelName
Browse files Browse the repository at this point in the history
  • Loading branch information
audserraCGI committed Mar 11, 2022
1 parent 3d549a0 commit 618cbe4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ public async Task WhenEnrollmentGroupAlreadyExistCreateEnrollmentGroupAsyncShoul
[TestCase("aaa", "aaa")]
[TestCase("AAA", "aaa")]
[TestCase("AAA AAA", "aaa-aaa")]
public async Task CreateEnrollmentGroupFormModelAsyncShouldCreateANewEnrollmentGroup(string modelName, string enrollmentGroupName)
public async Task CreateEnrollmentGroupFromModelAsyncShouldCreateANewEnrollmentGroup(string modelId, string enrollmentGroupName)
{
// Arrange
var manager = this.CreateManager();
var modelId = "bbb";
var modelName = "bbb";
var desiredProperties = new TwinCollection();
EnrollmentGroup enrollmentGroup = null;

Expand Down Expand Up @@ -163,11 +163,11 @@ public async Task CreateEnrollmentGroupFormModelAsyncShouldCreateANewEnrollmentG
[TestCase("aaa", "aaa")]
[TestCase("AAA", "aaa")]
[TestCase("AAA AAA", "aaa-aaa")]
public async Task WhenEnrollmentGroupExistCreateEnrollmentGroupFormModelAsyncShouldUpdate(string modelName, string enrollmentGroupName)
public async Task WhenEnrollmentGroupExistCreateEnrollmentGroupFromModelAsyncShouldUpdate(string modelId, string enrollmentGroupName)
{
// Arrange
var manager = this.CreateManager();
var modelId = "bbb";
var modelName = "bbb";
var desiredProperties = new TwinCollection();
EnrollmentGroup enrollmentGroup = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public async Task<EnrollmentGroup> CreateEnrollmentGroupFromModelAsync(string mo
tags: new TwinCollection($"{{ \"modelId\":\"{modelId}\" }}"),
desiredProperties: new TwinCollection());

return await this.CreateNewEnrollmentGroup(modelName, false, twinState);
return await this.CreateNewEnrollmentGroup(modelId, false, twinState);
}

private async Task<EnrollmentGroup> CreateNewEnrollmentGroup(string name, bool iotEdge, TwinState initialTwinState)
Expand Down

0 comments on commit 618cbe4

Please sign in to comment.