Skip to content

Commit

Permalink
Removed some old references in LoggerHomeHeaderController to now-remo…
Browse files Browse the repository at this point in the history
…ved properties on Logger.StatusApiResponse
  • Loading branch information
jongpie committed Jun 1, 2023
1 parent 4d29cbe commit 9640014
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ public without sharing class LoggerHomeHeaderController {

Logger.StatusApiResponse statusApiResponse = Logger.callStatusApi();
if (statusApiResponse != null) {
environment.organizationEnvironment = statusApiResponse.environment;
environment.organizationInstanceLocation = statusApiResponse.location;
environment.organizationMaintenanceWindow = statusApiResponse.maintenanceWindow;
environment.organizationReleaseNumber = statusApiResponse.releaseNumber;
environment.organizationReleaseVersion = statusApiResponse.releaseVersion;
environment.organizationStatus = statusApiResponse.status;

if (statusApiResponse.Products != null && statusApiResponse.Products.isEmpty() == false) {
environment.organizationInstanceProducts = getInstanceProductNames(statusApiResponse);
Expand Down Expand Up @@ -66,8 +64,6 @@ public without sharing class LoggerHomeHeaderController {
@AuraEnabled
public String organizationDomainUrl = 'Unknown';
@AuraEnabled
public String organizationEnvironment = 'Unknown';
@AuraEnabled
public String organizationFormattedCreatedDate = 'Unknown';
@AuraEnabled
public String organizationId = 'Unknown';
Expand All @@ -86,8 +82,6 @@ public without sharing class LoggerHomeHeaderController {
@AuraEnabled
public String organizationReleaseVersion = 'Unknown';
@AuraEnabled
public String organizationStatus = 'Unknown';
@AuraEnabled
public String organizationType = 'Unknown';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ private class LoggerHomeHeaderController_Tests {
System.Assert.areEqual(Logger.getOrganizationApiVersion(), returnedEnvironment.organizationApiVersion);
System.Assert.areEqual(organization.CreatedBy.Username, returnedEnvironment.organizationCreatedByUsername);
System.Assert.areEqual(System.URL.getOrgDomainUrl()?.toExternalForm(), returnedEnvironment.organizationDomainUrl);
System.Assert.areEqual(mockApiResponse.environment, returnedEnvironment.organizationEnvironment);
System.Assert.areEqual(organization.CreatedDate.format(), returnedEnvironment.organizationFormattedCreatedDate);
System.Assert.areEqual(System.UserInfo.getOrganizationId(), returnedEnvironment.organizationId);
System.Assert.areEqual(mockApiResponse.location, returnedEnvironment.organizationInstanceLocation);
Expand All @@ -41,7 +40,6 @@ private class LoggerHomeHeaderController_Tests {
System.Assert.areEqual(System.UserInfo.getOrganizationName(), returnedEnvironment.organizationName);
System.Assert.areEqual(mockApiResponse.releaseNumber, returnedEnvironment.organizationReleaseNumber);
System.Assert.areEqual(mockApiResponse.releaseVersion, returnedEnvironment.organizationReleaseVersion);
System.Assert.areEqual(mockApiResponse.status, returnedEnvironment.organizationStatus);
System.Assert.areEqual(organization.OrganizationType, returnedEnvironment.organizationType);
}

Expand All @@ -66,7 +64,6 @@ private class LoggerHomeHeaderController_Tests {
System.Assert.areEqual(Logger.getOrganizationApiVersion(), returnedEnvironment.organizationApiVersion);
System.Assert.areEqual(organization.CreatedBy.Username, returnedEnvironment.organizationCreatedByUsername);
System.Assert.areEqual(System.URL.getOrgDomainUrl()?.toExternalForm(), returnedEnvironment.organizationDomainUrl);
System.Assert.areEqual(mockApiResponse.environment, returnedEnvironment.organizationEnvironment);
System.Assert.areEqual(organization.CreatedDate.format(), returnedEnvironment.organizationFormattedCreatedDate);
System.Assert.areEqual(System.UserInfo.getOrganizationId(), returnedEnvironment.organizationId);
System.Assert.areEqual(mockApiResponse.location, returnedEnvironment.organizationInstanceLocation);
Expand All @@ -76,7 +73,6 @@ private class LoggerHomeHeaderController_Tests {
System.Assert.areEqual(System.UserInfo.getOrganizationName(), returnedEnvironment.organizationName);
System.Assert.areEqual(mockApiResponse.releaseNumber, returnedEnvironment.organizationReleaseNumber);
System.Assert.areEqual(mockApiResponse.releaseVersion, returnedEnvironment.organizationReleaseVersion);
System.Assert.areEqual(mockApiResponse.status, returnedEnvironment.organizationStatus);
System.Assert.areEqual(organization.OrganizationType, returnedEnvironment.organizationType);
}

Expand All @@ -95,7 +91,6 @@ private class LoggerHomeHeaderController_Tests {
System.Assert.areEqual(Logger.getOrganizationApiVersion(), returnedEnvironment.organizationApiVersion);
System.Assert.areEqual(organization.CreatedBy.Username, returnedEnvironment.organizationCreatedByUsername);
System.Assert.areEqual(System.URL.getOrgDomainUrl()?.toExternalForm(), returnedEnvironment.organizationDomainUrl);
System.Assert.areEqual('Unknown', returnedEnvironment.organizationEnvironment);
System.Assert.areEqual(organization.CreatedDate.format(), returnedEnvironment.organizationFormattedCreatedDate);
System.Assert.areEqual(System.UserInfo.getOrganizationId(), returnedEnvironment.organizationId);
System.Assert.areEqual('Unknown', returnedEnvironment.organizationInstanceLocation);
Expand All @@ -105,18 +100,15 @@ private class LoggerHomeHeaderController_Tests {
System.Assert.areEqual(System.UserInfo.getOrganizationName(), returnedEnvironment.organizationName);
System.Assert.areEqual('Unknown', returnedEnvironment.organizationReleaseNumber);
System.Assert.areEqual('Unknown', returnedEnvironment.organizationReleaseVersion);
System.Assert.areEqual('Unknown', returnedEnvironment.organizationStatus);
System.Assert.areEqual(organization.OrganizationType, returnedEnvironment.organizationType);
}

private static Logger.StatusApiResponse createMockStatusApiResponse() {
Logger.StatusApiResponse mockApiResponse = new Logger.StatusApiResponse();
mockApiResponse.environment = 'sandbox';
mockApiResponse.location = 'NA';
mockApiResponse.maintenanceWindow = 'Saturdays 07:00 PM - 11:00 PM PST';
mockApiResponse.releaseNumber = '242.19.17';
mockApiResponse.releaseVersion = 'Spring \'23 Patch 19.17';
mockApiResponse.status = 'OK';
return mockApiResponse;
}
}

0 comments on commit 9640014

Please sign in to comment.