Skip to content

Commit

Permalink
Rename key to appKey
Browse files Browse the repository at this point in the history
  • Loading branch information
kjetilhau committed Oct 30, 2024
1 parent e8ef71d commit a5dbe33
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ApiAddContextAppToPortalRequestValidator()
RuleFor(x => x.AppKey)
.NotEmpty()
.NotContainScriptTag()
.WithMessage("App Key required");
.WithMessage("AppKey required");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public ApiAddGlobalAppToPortalRequestValidator()
RuleFor(x => x.AppKey)
.NotEmpty()
.NotContainScriptTag()
.WithMessage("App Key required");
.WithMessage("AppKey required");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public ApiPortalApp()
}
public ApiPortalApp(PortalAppDto portalAppDto)
{
Key = portalAppDto.OnboardedApp.AppKey;
AppKey = portalAppDto.OnboardedApp.AppKey;
ContextTypes = portalAppDto.OnboardedApp.ContextTypes.Select(x => new ApiContextType(x)).ToList();
AppManifest = portalAppDto.OnboardedApp.AppInformation != null ? new ApiFusionApp(portalAppDto.OnboardedApp.AppInformation) : null;
}

public string Key { get; set; }
public string AppKey { get; set; }
public IList<ApiContextType> ContextTypes { get; set; }
public ApiFusionApp? AppManifest { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public ApiPortalOnboardedApp()

public ApiPortalOnboardedApp(PortalOnboardedAppDto portalOnboardedAppDto)
{
Key = portalOnboardedAppDto.OnboardedApp.AppKey;
AppKey = portalOnboardedAppDto.OnboardedApp.AppKey;
ContextTypes = portalOnboardedAppDto.OnboardedApp.ContextTypes.Select(x => x.ContextTypeKey).ToList();
ContextIds = portalOnboardedAppDto.ContextIds;
IsActive = portalOnboardedAppDto.IsActive;
Expand All @@ -19,7 +19,7 @@ public ApiPortalOnboardedApp(PortalOnboardedAppDto portalOnboardedAppDto)
AppManifest = portalOnboardedAppDto.OnboardedApp.AppInformation != null ? new ApiFusionApp(portalOnboardedAppDto.OnboardedApp.AppInformation) : null;
}

public string Key { get; set; }
public string AppKey { get; set; }
public IList<string> ContextTypes { get; set; }
public IList<Guid> ContextIds { get; set; }
public bool IsActive { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void AssertPortalAppValues(ApiPortalApp? portalAll)
Assert.Fail();
}

Assert.IsNotNull(portalAll.Key);
Assert.IsNotNull(portalAll.AppKey);
}

public static void AssertOnboardedAppValues(ApiOnboardedApp? onboardedApp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,13 @@ public async Task Delete_PortalApp_AsAdministrator_ShouldReturnOk()
var appToDelete = apps.First();

// Act
var response = await DeletePortalApp(portalToTest.Id, appToDelete.Key, UserType.Administrator);
var response = await DeletePortalApp(portalToTest.Id, appToDelete.AppKey, UserType.Administrator);

// Assert
Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);

// Verify the app is actually deleted
var deletedApp = await AssertGetPortalApp(portalToTest.Id, appToDelete.Key, UserType.Authenticated, HttpStatusCode.NotFound);
var deletedApp = await AssertGetPortalApp(portalToTest.Id, appToDelete.AppKey, UserType.Authenticated, HttpStatusCode.NotFound);
Assert.IsNull(deletedApp);
}

Expand All @@ -526,7 +526,7 @@ public async Task Delete_PortalApp_AsAuthenticatedUser_ShouldReturnForbidden()
var appToDelete = apps.First();

// Act
var response = await DeletePortalApp(portalToTest.Id, appToDelete.Key, UserType.Authenticated);
var response = await DeletePortalApp(portalToTest.Id, appToDelete.AppKey, UserType.Authenticated);

// Assert
Assert.AreEqual(HttpStatusCode.Forbidden, response.StatusCode);
Expand All @@ -548,7 +548,7 @@ public async Task Delete_PortalApp_AsAnonymousUser_ShouldReturnUnauthorized()
var appToDelete = apps.First();

// Act
var response = await DeletePortalApp(portalToTest.Id, appToDelete.Key, UserType.Anonymous);
var response = await DeletePortalApp(portalToTest.Id, appToDelete.AppKey, UserType.Anonymous);

// Assert
Assert.AreEqual(HttpStatusCode.Unauthorized, response.StatusCode);
Expand Down

0 comments on commit a5dbe33

Please sign in to comment.