Hello everyone,
the issues into the challenge control still persists.
As a Premise, I have tried different suggestions with 2 different trail-head org, a previously used and a fresh new one, the language is set to English and I have checked the spelling and coverage.
In my opinion is the challenge check that's not working properly due to the fact It's asking to call a test method isHighPriority with the same name of the AccountWrapper method, which we have to test.
Following the examples:
AccountWrapper piece of code
---------------------------------------------------------------
public Boolean isHighPriority() {
if (getRoundedAvgPriceOfOpps() > 100000.00) {
return true;
}
return false;
}
---------------------------------------------------------------
If I use into the test class a name like this:
@isTest static void testIsHighPriorityFalse() {
//TEST CODE
Test.startTest();
for(AccountWrapper a : accounts){
System.assertEquals(a.isHighPriority(), false, 'Priority expected to be high');
System.debug('get rounded price of opps for accounts b:'+ a.getRoundedAvgPriceOfOpps());
}
Test.stopTest();
}
I get this error:
We can't find the method “isHighPriority()” in the “AccountWrapperTests” class.
If I use into the test class a name like this:
@isTest static void IsHighPriority() {
//TEST CODE
Test.startTest();
for(AccountWrapper a : accounts){
System.assertEquals(a.isHighPriority(), false, 'Priority expected to be high');
System.debug('get rounded price of opps for accounts b:'+ a.getRoundedAvgPriceOfOpps());
}
Test.stopTest();
}
I get this error:
We can't find the expected declarations for the test method “isHighPriority” in the AccountWrapperTests class.
Is there someone that can help providing suggestions o fixing the issue?
Thanks
Attached the coverage I got, the class and test class I have tried with this chellange.
The coverage is around 93%
Show Less
Refer -
https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007FYsP8SAL
https://trailhead.salesforce.com/fr/trailblazer-community/feed/0D54V00007IfHpeSAF
and still issue then request to raise the support ticket to trailhead team to help further - https://trailhead.salesforce.com/help