Skip to content
4 changes: 2 additions & 2 deletions sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ public virtual with sharing class fflib_SObjectDomain
public override void onAfterInsert()
{
// This is a stateless domain class, so should not retain anything betweet before and after
System.assertEquals(null, someState);
Assert.areEqual(null, someState);
}
}

Expand Down Expand Up @@ -966,7 +966,7 @@ public virtual with sharing class fflib_SObjectDomain
public override void onBeforeInsert()
{
// This must always be null, as we do not reuse domain instances within recursive scenarios (different record sets)
System.assertEquals(null, someState);
Assert.areEqual(null, someState);

// Process records
List<Opportunity> newOpps = new List<Opportunity>();
Expand Down
148 changes: 74 additions & 74 deletions sfdx-source/apex-common/test/classes/fflib_ApplicationTest.cls

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions sfdx-source/apex-common/test/classes/fflib_ObjectsTest.cls
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private class fflib_ObjectsTest
}
);

System.assertEquals(
Assert.areEqual(
DataTransferObject.class,
dtoDomain.getType(),
'Wrong domain type'
Expand All @@ -62,7 +62,7 @@ private class fflib_ObjectsTest
}
);

System.assert(
Assert.isTrue(
dtoDomain.contains(transferObject),
'The object should have been part of the domain'
);
Expand All @@ -73,7 +73,7 @@ private class fflib_ObjectsTest
{
fflib_ObjectsTest.Domain dtoDomain = generateDomain();

System.assert(
Assert.isTrue(
dtoDomain.containsNot(TRANSFER_OBJECT_D),
'The object should not have been part of the domain'
);
Expand All @@ -89,7 +89,7 @@ private class fflib_ObjectsTest
TRANSFER_OBJECT_B
});

System.assert(
Assert.isTrue(
dtoDomain.containsNot(
new Set<Object>
{
Expand All @@ -98,7 +98,7 @@ private class fflib_ObjectsTest
}),
'The set of objects should not have been part of the domain'
);
System.assert(
Assert.isTrue(
dtoDomain.containsNot(
new List<Object>
{
Expand All @@ -113,23 +113,23 @@ private class fflib_ObjectsTest
static void itShouldHaveAnEmptyDomain()
{
fflib_ObjectsTest.Domain dtoDomain = new Domain(new List<DataTransferObject>());
System.assert(dtoDomain.isEmpty(), 'Domain should be empty');
Assert.isTrue(dtoDomain.isEmpty(), 'Domain should be empty');
}

@IsTest
static void itShouldNotBeAnEmptyDomain()
{
fflib_ObjectsTest.Domain dtoDomain = generateDomain();
System.assert(dtoDomain.isNotEmpty(), 'Domain should not be empty');
System.assertEquals(3, dtoDomain.size(), 'Incorrect amount of records in the domain');
Assert.isTrue(dtoDomain.isNotEmpty(), 'Domain should not be empty');
Assert.areEqual(3, dtoDomain.size(), 'Incorrect amount of records in the domain');
}

@IsTest
static void itShouldContainAllTheObjects()
{
fflib_ObjectsTest.Domain dtoDomain = generateDomain();

System.assert(
Assert.isTrue(
dtoDomain.containsAll(
new List<DataTransferObject>
{
Expand All @@ -139,7 +139,7 @@ private class fflib_ObjectsTest
),
'Domain should contain the whole List of objects'
);
System.assert(
Assert.isTrue(
dtoDomain.containsAll(
new Set<Object>
{
Expand All @@ -155,7 +155,7 @@ private class fflib_ObjectsTest
static void itShouldGetTheObjectType()
{
fflib_Objects domain = new fflib_Objects(new List<Object>());
System.assertEquals(Object.class, domain.getType(), 'Incorrect returned type');
Assert.areEqual(Object.class, domain.getType(), 'Incorrect returned type');
}

private static Domain generateDomain()
Expand Down
Loading