You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ortoo_Asserts.assertEndsWith( '__Application_Configuration__mdt', returnedName, 'getSobjectName, when given an SObjectType in the local namespace, will return the fully qualified API name of it' );
124
+
}
125
+
119
126
@isTest
120
127
privatestaticvoidgetSobjectName_whenGivenANullSobjectType_willThrowAnException() // NOPMD: Test method name format
121
128
{
@@ -136,6 +143,33 @@ private without sharing class SobjectUtilsTest
136
143
ortoo_Asserts.assertContains( 'Attempted to get the name of a null SObjectType', exceptionMessage, 'getSobjectName, when given a null SobjectType, will throw an exception' );
137
144
}
138
145
146
+
@isTest
147
+
privatestaticvoidgetSobjectLocalName_whenGivenAnSobjectTypeInLocalNamespace_willReturnTheShortApiNameOfIt() // NOPMD: Test method name format
System.assertEquals( 'Application_Configuration__mdt', returnedName, 'getSobjectLocalName, when given an SObjectType in the local namespace, will return the local API name of it' );
151
+
}
152
+
153
+
@isTest
154
+
privatestaticvoidgetSobjectLocalName_whenGivenANullSobjectType_willThrowAnException() // NOPMD: Test method name format
155
+
{
156
+
SobjectTypenullType=null;
157
+
158
+
Test.startTest();
159
+
StringexceptionMessage;
160
+
try
161
+
{
162
+
SobjectUtils.getSobjectLocalName( nullType );
163
+
}
164
+
catch ( Contract.RequiresExceptione )
165
+
{
166
+
exceptionMessage=e.getMessage();
167
+
}
168
+
Test.stopTest();
169
+
170
+
ortoo_Asserts.assertContains( 'Attempted to get the local name of a null SObjectType', exceptionMessage, 'getSobjectLocalName, when given a null SobjectType, will throw an exception' );
171
+
}
172
+
139
173
@isTest
140
174
privatestaticvoidisCreateable_whenCalled_willReturnIsCreatableOfThatSobject() // NOPMD: Test method name format
0 commit comments