diff --git a/nebula-logger/core/main/log-management/classes/LogBatchPurger.cls b/nebula-logger/core/main/log-management/classes/LogBatchPurger.cls index 4d7ab9983..f843b8e8d 100644 --- a/nebula-logger/core/main/log-management/classes/LogBatchPurger.cls +++ b/nebula-logger/core/main/log-management/classes/LogBatchPurger.cls @@ -25,7 +25,7 @@ global with sharing class LogBatchPurger implements Database.Batchable, @TestVisible private Integer chainedBatchSize = 200; @TestVisible - private SObjectType currentSObjectType; + private Schema.SObjectType currentSObjectType; private List pluginConfigurations; private Map> methodToExecutedApexPlugins = new Map>(); private Map> methodToExecutedFlowPlugins = new Map>(); diff --git a/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls b/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls index 5628aa3bc..bc8e2bb46 100644 --- a/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls +++ b/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls @@ -45,7 +45,7 @@ public without sharing class LogEntryEventHandler extends LoggerSObjectHandler { * @description Returns SObject Type that the handler is responsible for processing * @return The instance of `SObjectType` */ - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return Schema.LogEntryEvent__e.SObjectType; } diff --git a/nebula-logger/core/main/log-management/classes/LogEntryHandler.cls b/nebula-logger/core/main/log-management/classes/LogEntryHandler.cls index d31a8897b..f9a4ed0dc 100644 --- a/nebula-logger/core/main/log-management/classes/LogEntryHandler.cls +++ b/nebula-logger/core/main/log-management/classes/LogEntryHandler.cls @@ -18,7 +18,7 @@ public without sharing class LogEntryHandler extends LoggerSObjectHandler { * @description Returns SObject Type that the handler is responsible for processing * @return The instance of `SObjectType` */ - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return Schema.LogEntry__c.SObjectType; } diff --git a/nebula-logger/core/main/log-management/classes/LogEntryTagHandler.cls b/nebula-logger/core/main/log-management/classes/LogEntryTagHandler.cls index 014b67f9c..40ee83902 100644 --- a/nebula-logger/core/main/log-management/classes/LogEntryTagHandler.cls +++ b/nebula-logger/core/main/log-management/classes/LogEntryTagHandler.cls @@ -17,7 +17,7 @@ public without sharing class LogEntryTagHandler extends LoggerSObjectHandler { * @description Returns SObject Type that the handler is responsible for processing * @return The instance of `SObjectType` */ - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return Schema.LogEntryTag__c.SObjectType; } diff --git a/nebula-logger/core/main/log-management/classes/LogHandler.cls b/nebula-logger/core/main/log-management/classes/LogHandler.cls index 0c88d469c..d7df35ac0 100644 --- a/nebula-logger/core/main/log-management/classes/LogHandler.cls +++ b/nebula-logger/core/main/log-management/classes/LogHandler.cls @@ -21,7 +21,7 @@ public without sharing class LogHandler extends LoggerSObjectHandler { * @description Returns SObject Type that the handler is responsible for processing * @return The instance of `SObjectType` */ - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return Schema.Log__c.SObjectType; } diff --git a/nebula-logger/core/main/log-management/classes/LoggerTagHandler.cls b/nebula-logger/core/main/log-management/classes/LoggerTagHandler.cls index 72316d4ef..80fd8df90 100644 --- a/nebula-logger/core/main/log-management/classes/LoggerTagHandler.cls +++ b/nebula-logger/core/main/log-management/classes/LoggerTagHandler.cls @@ -17,7 +17,7 @@ public without sharing class LoggerTagHandler extends LoggerSObjectHandler { * @description Returns SObject Type that the handler is responsible for processing * @return The instance of `SObjectType` */ - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return Schema.LoggerTag__c.SObjectType; } diff --git a/nebula-logger/core/main/log-management/classes/RelatedLogEntriesController.cls b/nebula-logger/core/main/log-management/classes/RelatedLogEntriesController.cls index fc1bce0c9..f964d3347 100644 --- a/nebula-logger/core/main/log-management/classes/RelatedLogEntriesController.cls +++ b/nebula-logger/core/main/log-management/classes/RelatedLogEntriesController.cls @@ -9,8 +9,8 @@ */ @SuppressWarnings('PMD.ExcessivePublicCount') public with sharing class RelatedLogEntriesController { - private static final SObjectType LOG_SOBJECT_TYPE = Schema.Log__c.SObjectType; - private static final SObjectType LOG_ENTRY_SOBJECT_TYPE = Schema.LogEntry__c.SObjectType; + private static final Schema.SObjectType LOG_SOBJECT_TYPE = Schema.Log__c.SObjectType; + private static final Schema.SObjectType LOG_ENTRY_SOBJECT_TYPE = Schema.LogEntry__c.SObjectType; private static final String DEFAULT_SORT_FIELD_NAME = String.valueOf(Schema.LogEntry__c.Timestamp__c); private static final String DEFAULT_SORT_DIRECTION = 'DESC'; @@ -122,7 +122,7 @@ public with sharing class RelatedLogEntriesController { private static String getDisplayFieldApiName(Schema.DescribeFieldResult lookupFieldDescribe) { String relationshipName = lookupFieldDescribe.getRelationshipName(); - SObjectType lookupSObjectType = lookupFieldDescribe.getReferenceTo().get(0); + Schema.SObjectType lookupSObjectType = lookupFieldDescribe.getReferenceTo().get(0); // Use username instead of name for user if (lookupSObjectType == Schema.User.SObjectType) { @@ -276,7 +276,7 @@ public with sharing class RelatedLogEntriesController { @AuraEnabled public String name { get; set; } - private FieldSetMetadata(SObjectType sobjectType, String fieldSetName) { + private FieldSetMetadata(Schema.SObjectType sobjectType, String fieldSetName) { this.fields = new List(); Schema.FieldSet fieldSet = sobjectType.getDescribe().fieldSets.getMap().get(fieldSetName); diff --git a/nebula-logger/core/tests/logger-engine/classes/LoggerSObjectHandler_Tests.cls b/nebula-logger/core/tests/logger-engine/classes/LoggerSObjectHandler_Tests.cls index aa8cdd7fc..454bd7aa9 100644 --- a/nebula-logger/core/tests/logger-engine/classes/LoggerSObjectHandler_Tests.cls +++ b/nebula-logger/core/tests/logger-engine/classes/LoggerSObjectHandler_Tests.cls @@ -317,7 +317,7 @@ private class LoggerSObjectHandler_Tests { } public class MockDefaultImplementationSObjectHandler extends LoggerSObjectHandler { - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return Schema.User.SObjectType; } } @@ -339,7 +339,7 @@ private class LoggerSObjectHandler_Tests { this.sobjectType = sobjectType; } - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return this.sobjectType; } diff --git a/nebula-logger/core/tests/logger-engine/classes/Logger_Tests.cls b/nebula-logger/core/tests/logger-engine/classes/Logger_Tests.cls index 7a6847b0c..85daf4b42 100644 --- a/nebula-logger/core/tests/logger-engine/classes/Logger_Tests.cls +++ b/nebula-logger/core/tests/logger-engine/classes/Logger_Tests.cls @@ -372,7 +372,7 @@ private class Logger_Tests { Integer countOfExistingLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(0, countOfExistingLogEntries); - Test.startTest(); + System.Test.startTest(); Logger.getUserSettings().IsEnabled__c = true; Logger.getUserSettings().LoggingLevel__c = LoggingLevel.DEBUG.name(); @@ -382,7 +382,7 @@ private class Logger_Tests { Logger.debug('test log entry'); Logger.saveLog(); - Test.stopTest(); + System.Test.stopTest(); countOfExistingLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(0, countOfExistingLogEntries); @@ -394,7 +394,7 @@ private class Logger_Tests { Integer countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(0, countOfLogEntries); - Test.startTest(); + System.Test.startTest(); Logger.getUserSettings().IsEnabled__c = true; Logger.getUserSettings().LoggingLevel__c = LoggingLevel.FINEST.name(); @@ -421,7 +421,7 @@ private class Logger_Tests { System.Test.getEventBus().deliver(); - Test.stopTest(); + System.Test.stopTest(); countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(logEntriesToCreate, countOfLogEntries); @@ -491,7 +491,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getPublishImmediateDml()); - Test.startTest(); + System.Test.startTest(); Logger.saveLog(); System.assertEquals(0, Limits.getPublishImmediateDml()); @@ -499,7 +499,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(0, countOfLogEntries); @@ -522,7 +522,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getPublishImmediateDml()); - Test.startTest(); + System.Test.startTest(); Logger.saveLog(); System.assertEquals(1, Limits.getPublishImmediateDml()); @@ -530,7 +530,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(2, countOfLogEntries); @@ -549,7 +549,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getPublishImmediateDml()); - Test.startTest(); + System.Test.startTest(); Logger.saveLog(Logger.SaveMethod.EVENT_BUS); System.assertEquals(1, Limits.getPublishImmediateDml()); @@ -557,7 +557,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(2, countOfLogEntries); @@ -576,7 +576,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getPublishImmediateDml()); - Test.startTest(); + System.Test.startTest(); Logger.SaveMethod expectedSaveMethod = Logger.SaveMethod.EVENT_BUS; Logger.setSaveMethod(expectedSaveMethod); @@ -587,7 +587,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(2, countOfLogEntries); @@ -603,7 +603,7 @@ private class Logger_Tests { Logger.getUserSettings().DefaultSaveMethod__c = 'QUEUEABLE'; upsert Logger.getUserSettings(); - Test.startTest(); + System.Test.startTest(); System.assertEquals(Logger.SaveMethod.QUEUEABLE, Logger.getSaveMethod()); @@ -620,7 +620,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(2, countOfLogEntries); @@ -639,7 +639,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getQueueableJobs()); - Test.startTest(); + System.Test.startTest(); Logger.saveLog(Logger.SaveMethod.QUEUEABLE); System.assertEquals(0, Limits.getPublishImmediateDml()); @@ -649,7 +649,7 @@ private class Logger_Tests { System.Test.getEventBus().deliver(); - Test.stopTest(); + System.Test.stopTest(); countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(2, countOfLogEntries); @@ -668,7 +668,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getQueueableJobs()); - Test.startTest(); + System.Test.startTest(); Logger.SaveMethod expectedSaveMethod = Logger.SaveMethod.QUEUEABLE; Logger.setSaveMethod(expectedSaveMethod); @@ -681,7 +681,7 @@ private class Logger_Tests { System.Test.getEventBus().deliver(); - Test.stopTest(); + System.Test.stopTest(); countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(2, countOfLogEntries); @@ -690,7 +690,7 @@ private class Logger_Tests { @IsTest static void it_should_save_via_rest_api_when_defaulted() { // TODO eliminate references to Log__c, find alternative way to assert on expected data - Test.setMock(HttpCalloutMock.class, LoggerMockDataCreator.createHttpCallout().setStatusCode(200)); + System.Test.setMock(HttpCalloutMock.class, LoggerMockDataCreator.createHttpCallout().setStatusCode(200)); Integer countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(0, countOfLogEntries); @@ -706,7 +706,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); - Test.startTest(); + System.Test.startTest(); Logger.saveLog(); System.assertEquals(0, Limits.getPublishImmediateDml()); @@ -714,13 +714,13 @@ private class Logger_Tests { System.assertEquals(1, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); } @IsTest static void it_should_save_via_rest_api_when_specified_via_settings() { // TODO eliminate references to Log__c, find alternative way to assert on expected data - Test.setMock(HttpCalloutMock.class, LoggerMockDataCreator.createHttpCallout().setStatusCode(200)); + System.Test.setMock(HttpCalloutMock.class, LoggerMockDataCreator.createHttpCallout().setStatusCode(200)); Integer countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(0, countOfLogEntries); @@ -732,7 +732,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); - Test.startTest(); + System.Test.startTest(); Logger.saveLog(Logger.SaveMethod.REST); System.assertEquals(0, Limits.getPublishImmediateDml()); @@ -740,13 +740,13 @@ private class Logger_Tests { System.assertEquals(1, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); } @IsTest static void it_should_save_via_rest_api_when_specified_via_setSaveMethod() { // TODO eliminate references to Log__c, find alternative way to assert on expected data - Test.setMock(HttpCalloutMock.class, LoggerMockDataCreator.createHttpCallout().setStatusCode(200)); + System.Test.setMock(HttpCalloutMock.class, LoggerMockDataCreator.createHttpCallout().setStatusCode(200)); Integer countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(0, countOfLogEntries); @@ -758,7 +758,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); - Test.startTest(); + System.Test.startTest(); Logger.SaveMethod expectedSaveMethod = Logger.SaveMethod.REST; Logger.setSaveMethod(expectedSaveMethod); @@ -769,13 +769,13 @@ private class Logger_Tests { System.assertEquals(1, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); } @IsTest static void it_should_throw_exception_when_save_via_rest_api_fails() { // TODO eliminate references to Log__c, find alternative way to assert on expected data - Test.setMock(HttpCalloutMock.class, LoggerMockDataCreator.createHttpCallout().setStatusCode(400)); + System.Test.setMock(HttpCalloutMock.class, LoggerMockDataCreator.createHttpCallout().setStatusCode(400)); Integer countOfLogEntries = [SELECT COUNT() FROM LogEntry__c]; System.assertEquals(0, countOfLogEntries); @@ -787,7 +787,7 @@ private class Logger_Tests { System.assertEquals(0, Limits.getCallouts()); - Test.startTest(); + System.Test.startTest(); try { Logger.saveLog(Logger.SaveMethod.REST); @@ -799,7 +799,7 @@ private class Logger_Tests { System.assertEquals(1, Limits.getCallouts()); System.assertEquals(0, Limits.getDmlStatements()); - Test.stopTest(); + System.Test.stopTest(); } @IsTest @@ -820,7 +820,7 @@ private class Logger_Tests { List logEntryEvents = new List(); logEntryEvents.add(Logger.debug('test log entry').getLogEntryEvent()); logEntryEvents.add(Logger.debug('another test log entry').getLogEntryEvent()); - Test.startTest(); + System.Test.startTest(); System.assertEquals(0, Limits.getPublishImmediateDml()); System.assertEquals(0, Limits.getQueueableJobs()); System.assertEquals(0, Limits.getCallouts()); @@ -853,7 +853,7 @@ private class Logger_Tests { System.assertEquals(logEntryEvents.size(), mockLogEntryEventAfterInsertHandler.executedTriggerNew.size()); System.assertEquals(logEntryEvents.get(0), mockLogEntryEventAfterInsertHandler.executedTriggerNew.get(0)); System.assertEquals(logEntryEvents.get(1), mockLogEntryEventAfterInsertHandler.executedTriggerNew.get(1)); - Test.stopTest(); + System.Test.stopTest(); } @IsTest @@ -870,7 +870,7 @@ private class Logger_Tests { List logEntryEvents = new List(); logEntryEvents.add(Logger.debug('test log entry').getLogEntryEvent()); logEntryEvents.add(Logger.debug('another test log entry').getLogEntryEvent()); - Test.startTest(); + System.Test.startTest(); System.assertEquals(0, Limits.getPublishImmediateDml()); System.assertEquals(0, Limits.getQueueableJobs()); System.assertEquals(0, Limits.getCallouts()); @@ -905,7 +905,7 @@ private class Logger_Tests { System.assertEquals(logEntryEvents.size(), mockLogEntryEventAfterInsertHandler.executedTriggerNew.size()); System.assertEquals(logEntryEvents.get(0), mockLogEntryEventAfterInsertHandler.executedTriggerNew.get(0)); System.assertEquals(logEntryEvents.get(1), mockLogEntryEventAfterInsertHandler.executedTriggerNew.get(1)); - Test.stopTest(); + System.Test.stopTest(); } @IsTest @@ -922,7 +922,7 @@ private class Logger_Tests { List logEntryEvents = new List(); logEntryEvents.add(Logger.debug('test log entry').getLogEntryEvent()); logEntryEvents.add(Logger.debug('another test log entry').getLogEntryEvent()); - Test.startTest(); + System.Test.startTest(); System.assertEquals(0, Limits.getPublishImmediateDml()); System.assertEquals(0, Limits.getQueueableJobs()); System.assertEquals(0, Limits.getCallouts()); @@ -957,7 +957,7 @@ private class Logger_Tests { System.assertEquals(logEntryEvents.size(), mockLogEntryEventAfterInsertHandler.executedTriggerNew.size()); System.assertEquals(logEntryEvents.get(0), mockLogEntryEventAfterInsertHandler.executedTriggerNew.get(0)); System.assertEquals(logEntryEvents.get(1), mockLogEntryEventAfterInsertHandler.executedTriggerNew.get(1)); - Test.stopTest(); + System.Test.stopTest(); } @IsTest @@ -980,11 +980,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1004,11 +1004,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1028,11 +1028,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1052,11 +1052,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1076,11 +1076,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1100,11 +1100,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1124,11 +1124,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1148,11 +1148,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1172,11 +1172,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1196,11 +1196,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1220,11 +1220,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(false, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1244,11 +1244,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1268,11 +1268,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(false, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1292,11 +1292,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1314,11 +1314,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1336,11 +1336,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), getRecord().Id, getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1358,11 +1358,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1380,11 +1380,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), getRecord(), getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1402,11 +1402,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1424,12 +1424,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), users, getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1447,12 +1447,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1470,11 +1470,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getLogMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1496,11 +1496,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1520,11 +1520,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1544,11 +1544,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1568,11 +1568,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1592,11 +1592,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1616,11 +1616,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1640,11 +1640,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1664,11 +1664,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(false, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1688,11 +1688,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1712,11 +1712,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(false, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1736,11 +1736,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1760,11 +1760,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1784,11 +1784,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1808,11 +1808,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1830,11 +1830,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1852,11 +1852,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), getRecord().Id, getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1874,11 +1874,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1896,11 +1896,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), getRecord(), getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1918,11 +1918,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1940,12 +1940,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), users, getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1963,12 +1963,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.error(getMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -1986,11 +1986,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.error(getMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2011,11 +2011,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2035,11 +2035,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2059,11 +2059,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2083,11 +2083,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2107,11 +2107,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2131,11 +2131,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2155,11 +2155,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2179,11 +2179,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(false, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2203,11 +2203,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2227,11 +2227,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(false, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2249,11 +2249,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2271,11 +2271,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), getRecord().Id, getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2293,11 +2293,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2315,11 +2315,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), getRecord(), getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2337,11 +2337,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2359,12 +2359,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), users, getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2382,12 +2382,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2405,11 +2405,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getLogMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2431,11 +2431,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2455,11 +2455,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2479,11 +2479,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2503,11 +2503,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2527,11 +2527,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2551,11 +2551,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2575,11 +2575,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2599,11 +2599,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(false, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2623,11 +2623,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2647,11 +2647,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(false, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2669,11 +2669,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2691,11 +2691,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), getRecord().Id, getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2713,11 +2713,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2735,11 +2735,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), getRecord(), getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2757,11 +2757,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2779,12 +2779,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), users, getException()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2802,12 +2802,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.warn(getMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2825,11 +2825,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.warn(getMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2851,11 +2851,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2875,11 +2875,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2899,11 +2899,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2923,11 +2923,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2947,11 +2947,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2971,11 +2971,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -2995,11 +2995,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3019,11 +3019,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3043,11 +3043,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3065,11 +3065,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3087,11 +3087,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3109,12 +3109,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3132,11 +3132,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getLogMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3158,11 +3158,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3182,11 +3182,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3206,11 +3206,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3230,11 +3230,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3254,11 +3254,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3278,11 +3278,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3302,11 +3302,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3326,11 +3326,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3350,11 +3350,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3372,11 +3372,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3394,11 +3394,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3416,12 +3416,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.info(getMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3439,11 +3439,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.info(getMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3465,11 +3465,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3489,11 +3489,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3513,11 +3513,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3537,11 +3537,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3561,11 +3561,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3585,11 +3585,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3609,11 +3609,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3633,11 +3633,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3657,11 +3657,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3679,11 +3679,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3701,11 +3701,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3723,12 +3723,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3746,11 +3746,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getLogMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3772,11 +3772,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3796,11 +3796,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3820,11 +3820,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3844,11 +3844,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3868,11 +3868,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3892,11 +3892,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3916,11 +3916,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3940,11 +3940,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3964,11 +3964,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -3986,11 +3986,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4008,11 +4008,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4030,12 +4030,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.debug(getMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4053,11 +4053,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.debug(getMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4079,11 +4079,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4103,11 +4103,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4127,11 +4127,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4151,11 +4151,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4175,11 +4175,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4199,11 +4199,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4223,11 +4223,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4247,11 +4247,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4271,11 +4271,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4293,11 +4293,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4315,11 +4315,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4337,12 +4337,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4360,11 +4360,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getLogMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4386,11 +4386,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4410,11 +4410,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4434,11 +4434,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4458,11 +4458,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4482,11 +4482,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4506,11 +4506,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4530,11 +4530,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4554,11 +4554,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4578,11 +4578,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4600,11 +4600,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4622,11 +4622,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4644,12 +4644,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.fine(getMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4667,11 +4667,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.fine(getMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4693,11 +4693,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4717,11 +4717,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4741,11 +4741,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4765,11 +4765,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4789,11 +4789,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4813,11 +4813,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4837,11 +4837,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4861,11 +4861,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4885,11 +4885,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4907,11 +4907,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4929,11 +4929,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4951,12 +4951,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -4974,11 +4974,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getLogMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5000,11 +5000,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5024,11 +5024,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5048,11 +5048,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5072,11 +5072,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5096,11 +5096,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5120,11 +5120,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5144,11 +5144,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5168,11 +5168,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5192,11 +5192,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5214,11 +5214,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5236,11 +5236,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5258,12 +5258,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.finer(getMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5281,11 +5281,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finer(getMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5307,11 +5307,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5331,11 +5331,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5355,11 +5355,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5379,11 +5379,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5403,11 +5403,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5427,11 +5427,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5451,11 +5451,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5475,11 +5475,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5499,11 +5499,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5521,11 +5521,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5543,11 +5543,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5565,12 +5565,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5588,11 +5588,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getLogMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5614,11 +5614,11 @@ private class Logger_Tests { Database.DeleteResult deleteResult = LoggerMockDataCreator.createDatabaseDeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), deleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5638,11 +5638,11 @@ private class Logger_Tests { Database.SaveResult saveResult = LoggerMockDataCreator.createDatabaseSaveResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), saveResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5662,11 +5662,11 @@ private class Logger_Tests { Database.UndeleteResult undeleteResult = LoggerMockDataCreator.createDatabaseUndeleteResult(true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), undeleteResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5686,11 +5686,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, true); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5710,11 +5710,11 @@ private class Logger_Tests { Database.UpsertResult upsertResult = LoggerMockDataCreator.createDatabaseUpsertResult(true, false); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), upsertResult); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5734,11 +5734,11 @@ private class Logger_Tests { List deleteResults = getDeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), deleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5758,11 +5758,11 @@ private class Logger_Tests { List saveResults = getSaveResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), saveResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5782,11 +5782,11 @@ private class Logger_Tests { List undeleteResults = getUndeleteResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), undeleteResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5806,11 +5806,11 @@ private class Logger_Tests { List upsertResults = getUpsertResultList(); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), upsertResults); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5828,11 +5828,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), getRecord().Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5850,11 +5850,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), getRecord()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5872,12 +5872,12 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); List users = [SELECT Id, Name, Username, IsActive FROM User LIMIT 5]; LogEntryEventBuilder entryBuilder = Logger.finest(getMessage(), users); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5895,11 +5895,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.finest(getMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); @@ -5921,12 +5921,12 @@ private class Logger_Tests { System.assertEquals(false, Logger.meetsUserLoggingLevel(logEntryLoggingLevel)); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); Boolean shouldSave = true; LogEntryEventBuilder entryBuilder = Logger.newEntry(logEntryLoggingLevel, getLogMessage(), shouldSave); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(shouldSave, entryBuilder.shouldSave()); @@ -5947,12 +5947,12 @@ private class Logger_Tests { System.assertEquals(false, Logger.meetsUserLoggingLevel(logEntryLoggingLevel)); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); Boolean shouldSave = false; LogEntryEventBuilder entryBuilder = Logger.newEntry(logEntryLoggingLevel, getLogMessage(), shouldSave); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(0, Logger.getBufferSize()); System.assertEquals(shouldSave, entryBuilder.shouldSave()); @@ -5965,11 +5965,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.newEntry(loggingLevel, getLogMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(true, entryBuilder.shouldSave()); @@ -5992,12 +5992,12 @@ private class Logger_Tests { System.assertEquals(false, Logger.meetsUserLoggingLevel(logEntryLoggingLevel)); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); Boolean shouldSave = true; LogEntryEventBuilder entryBuilder = Logger.newEntry(logEntryLoggingLevel, getMessage(), shouldSave); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(shouldSave, entryBuilder.shouldSave()); @@ -6018,12 +6018,12 @@ private class Logger_Tests { System.assertEquals(false, Logger.meetsUserLoggingLevel(logEntryLoggingLevel)); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); Boolean shouldSave = false; LogEntryEventBuilder entryBuilder = Logger.newEntry(logEntryLoggingLevel, getMessage(), shouldSave); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(0, Logger.getBufferSize()); System.assertEquals(shouldSave, entryBuilder.shouldSave()); @@ -6036,11 +6036,11 @@ private class Logger_Tests { setUserLoggingLevel(loggingLevel); System.assertEquals(0, Logger.getBufferSize()); - Test.startTest(); + System.Test.startTest(); LogEntryEventBuilder entryBuilder = Logger.newEntry(loggingLevel, getMessage()); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(1, Logger.getBufferSize()); System.assertEquals(true, entryBuilder.shouldSave()); @@ -6073,9 +6073,9 @@ private class Logger_Tests { Log__c log = new Log__c(TransactionId__c = '1234'); insert log; - Test.startTest(); + System.Test.startTest(); Log__c returnedLog = Logger.getLog(log.Id); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(log.Id, returnedLog.Id); } @@ -6085,9 +6085,9 @@ private class Logger_Tests { Log__c log = new Log__c(TransactionId__c = '1234'); insert log; - Test.startTest(); + System.Test.startTest(); Log__c returnedLog = Logger.getLog(log.TransactionId__c); - Test.stopTest(); + System.Test.stopTest(); System.assertEquals(log.Id, returnedLog.Id); } @@ -6186,7 +6186,7 @@ private class Logger_Tests { this.sobjectType = Schema.LogEntryEvent__e.SObjectType; } - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return this.sobjectType; } diff --git a/nebula-logger/extra-tests/classes/ExampleInboundEmailHandler.cls b/nebula-logger/extra-tests/classes/ExampleInboundEmailHandler.cls index 81fc050ac..5b72c34b3 100644 --- a/nebula-logger/extra-tests/classes/ExampleInboundEmailHandler.cls +++ b/nebula-logger/extra-tests/classes/ExampleInboundEmailHandler.cls @@ -1,3 +1,8 @@ +//------------------------------------------------------------------------------------------------// +// This file is part of the Nebula Logger project, released under the MIT License. // +// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // +//------------------------------------------------------------------------------------------------// + /** * @description Example inbound email handler class */ diff --git a/nebula-logger/extra-tests/classes/FieldSet.cls b/nebula-logger/extra-tests/classes/FieldSet.cls new file mode 100644 index 000000000..68a8f130c --- /dev/null +++ b/nebula-logger/extra-tests/classes/FieldSet.cls @@ -0,0 +1,10 @@ +//------------------------------------------------------------------------------------------------// +// This file is part of the Nebula Logger project, released under the MIT License. // +// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // +//------------------------------------------------------------------------------------------------// + +// This class intentionally does nothing - it's here to ensure that any references +// in Nebula Logger's codebase use `Schema.FieldSet` instead of just `FieldSet` +@SuppressWarnings('PMD.ApexDoc, PMD.EmptyStatementBlock') +public without sharing class FieldSet { +} diff --git a/nebula-logger/extra-tests/classes/FieldSet.cls-meta.xml b/nebula-logger/extra-tests/classes/FieldSet.cls-meta.xml new file mode 100644 index 000000000..891916bb0 --- /dev/null +++ b/nebula-logger/extra-tests/classes/FieldSet.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/extra-tests/classes/FieldSetMember.cls b/nebula-logger/extra-tests/classes/FieldSetMember.cls new file mode 100644 index 000000000..6df3c391b --- /dev/null +++ b/nebula-logger/extra-tests/classes/FieldSetMember.cls @@ -0,0 +1,10 @@ +//------------------------------------------------------------------------------------------------// +// This file is part of the Nebula Logger project, released under the MIT License. // +// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // +//------------------------------------------------------------------------------------------------// + +// This class intentionally does nothing - it's here to ensure that any references +// in Nebula Logger's codebase use `Schema.FieldSetMember` instead of just `FieldSetMember` +@SuppressWarnings('PMD.ApexDoc, PMD.EmptyStatementBlock') +public without sharing class FieldSetMember { +} diff --git a/nebula-logger/extra-tests/classes/FieldSetMember.cls-meta.xml b/nebula-logger/extra-tests/classes/FieldSetMember.cls-meta.xml new file mode 100644 index 000000000..891916bb0 --- /dev/null +++ b/nebula-logger/extra-tests/classes/FieldSetMember.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/extra-tests/classes/SObjectField.cls b/nebula-logger/extra-tests/classes/SObjectField.cls new file mode 100644 index 000000000..4a7a98f26 --- /dev/null +++ b/nebula-logger/extra-tests/classes/SObjectField.cls @@ -0,0 +1,10 @@ +//------------------------------------------------------------------------------------------------// +// This file is part of the Nebula Logger project, released under the MIT License. // +// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // +//------------------------------------------------------------------------------------------------// + +// This class intentionally does nothing - it's here to ensure that any references +// in Nebula Logger's codebase use `Schema.SObjectField` instead of just `SObjectField` +@SuppressWarnings('PMD.ApexDoc, PMD.EmptyStatementBlock') +public without sharing class SObjectField { +} diff --git a/nebula-logger/extra-tests/classes/SObjectField.cls-meta.xml b/nebula-logger/extra-tests/classes/SObjectField.cls-meta.xml new file mode 100644 index 000000000..891916bb0 --- /dev/null +++ b/nebula-logger/extra-tests/classes/SObjectField.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/extra-tests/classes/SObjectType.cls b/nebula-logger/extra-tests/classes/SObjectType.cls new file mode 100644 index 000000000..935acbd44 --- /dev/null +++ b/nebula-logger/extra-tests/classes/SObjectType.cls @@ -0,0 +1,10 @@ +//------------------------------------------------------------------------------------------------// +// This file is part of the Nebula Logger project, released under the MIT License. // +// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // +//------------------------------------------------------------------------------------------------// + +// This class intentionally does nothing - it's here to ensure that any references +// in Nebula Logger's codebase use `Schema.SObjectType` instead of just `SObjectType` +@SuppressWarnings('PMD.ApexDoc, PMD.EmptyStatementBlock') +public without sharing class SObjectType { +} diff --git a/nebula-logger/extra-tests/classes/SObjectType.cls-meta.xml b/nebula-logger/extra-tests/classes/SObjectType.cls-meta.xml new file mode 100644 index 000000000..891916bb0 --- /dev/null +++ b/nebula-logger/extra-tests/classes/SObjectType.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/extra-tests/classes/Test.cls b/nebula-logger/extra-tests/classes/Test.cls new file mode 100644 index 000000000..a46eb1bd2 --- /dev/null +++ b/nebula-logger/extra-tests/classes/Test.cls @@ -0,0 +1,10 @@ +//------------------------------------------------------------------------------------------------// +// This file is part of the Nebula Logger project, released under the MIT License. // +// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // +//------------------------------------------------------------------------------------------------// + +// This class intentionally does nothing - it's here to ensure that any references +// in Nebula Logger's codebase use `System.Test` instead of just `Test` +@SuppressWarnings('PMD.ApexDoc, PMD.EmptyStatementBlock') +public without sharing class Test { +} diff --git a/nebula-logger/extra-tests/classes/Test.cls-meta.xml b/nebula-logger/extra-tests/classes/Test.cls-meta.xml new file mode 100644 index 000000000..891916bb0 --- /dev/null +++ b/nebula-logger/extra-tests/classes/Test.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/extra-tests/tests/LogBatchPurger_Tests_Integration.cls b/nebula-logger/extra-tests/tests/LogBatchPurger_Tests_Integration.cls index e505762a9..1723d1a2d 100644 --- a/nebula-logger/extra-tests/tests/LogBatchPurger_Tests_Integration.cls +++ b/nebula-logger/extra-tests/tests/LogBatchPurger_Tests_Integration.cls @@ -48,9 +48,9 @@ private class LogBatchPurger_Tests_Integration { System.assertEquals(false, Schema.Log__c.SObjectType.getDescribe().isDeletable()); try { - Test.startTest(); + System.Test.startTest(); Database.executeBatch(new LogBatchPurger()); - Test.stopTest(); + System.Test.stopTest(); } catch (NoAccessException ex) { System.assertEquals(LogBatchPurger.NO_DELETE_ACCESS_EXCEPTION_MESSAGE, ex.getMessage()); } diff --git a/nebula-logger/extra-tests/tests/LoggerSObjectHandler_Tests_Flow.cls b/nebula-logger/extra-tests/tests/LoggerSObjectHandler_Tests_Flow.cls index 3855b4ada..e6cc3cc6e 100644 --- a/nebula-logger/extra-tests/tests/LoggerSObjectHandler_Tests_Flow.cls +++ b/nebula-logger/extra-tests/tests/LoggerSObjectHandler_Tests_Flow.cls @@ -36,7 +36,7 @@ private class LoggerSObjectHandler_Tests_Flow { } private class MockLogHandler extends LoggerSObjectHandler { - public override SObjectType getSObjectType() { + public override Schema.SObjectType getSObjectType() { return Schema.Log__c.SObjectType; } }