ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
6 errors are not retifed pls help me bro
Thankyou it really worked I have been trying this for long but it didn't work thanks man
hii getting Invalid interface: ParkServiceMock error in test class
No Apex class named 'ParkService' was found. Ensure the class you generated from the WSDL is named 'ParkService'..please help me.. this is my error
same
These code has 6 errors 😭
Same problem bro
Thanks❤🙏
please send me code
ParkLocator:public class ParkLocator { public static String [] country (String x) { String parks = x; // {'Yellowstone','Kanha','Mount Fuji'}; ParkService.ParksImplPort findCountries = new ParkService.ParksImplPort (); return findCountries.byCountry (parks); }}ParkLocatorTest:@isTestpublic class ParkLocatorTest { @isTest static void testCallout () { // This causes a fake response to be generated Test.setMock (WebServiceMock.class, new ParkServiceMock ()); String x ='Yellowstone'; List result = ParkLocator.country (x); string resultstring = string.join (result,','); System.assertEquals ('USA', resultstring); }}ParkServiceMock:@isTestglobal class ParkServiceMock implements WebServiceMock { global void doInvoke ( Object stub, Object request, Map response, String endpoint, String soapAction, String requestName, String responseNS, String responseName, String responseType) { ParkService.byCountryResponse response_x =new ParkService.byCountryResponse (); response_x.return_x = new List {'USA'}; response.put ('response_x', response_x); }}
Executing the 'country' method on 'ParkLocator' failed. Make sure the method exists with the name 'country', is public and static, accepts a String, and returns an array of Strings from the web service.
Bro same here
Same here
@@Sezu_world27 I got the answers there are few steps for this
@@amjadmansoor6115 could you please tell me those steps?
@@amjadmansoor6115 please explain those steps to us
ParkLocator:public class ParkLocator { public static String [] country (String x) { String parks = x; // {'Yellowstone','Kanha','Mount Fuji'}; ParkService.ParksImplPort findCountries = new ParkService.ParksImplPort (); return findCountries.byCountry (parks); }}ParkLocatorTest:@isTestpublic class ParkLocatorTest { @isTest static void testCallout () { // This causes a fake response to be generated Test.setMock (WebServiceMock.class, new ParkServiceMock ()); String x ='Yellowstone'; List result = ParkLocator.country(x); string resultstring = string.join (result,','); System.assertEquals ('USA', resultstring); }}ParkServiceMock:@isTestglobal class ParkServiceMock implements WebServiceMock { global void doInvoke ( Object stub, Object request, Map response, String endpoint, String soapAction, String requestName, String responseNS, String responseName, String responseType) { ParkService.byCountryResponse response_x =new ParkService.byCountryResponse (); response_x.return_x = new List {'USA'}; response.put ('response_x', response_x); }}
There are 6 errors in these codes
Are you resolve these six errors pls reply
@@fardhinbashamannepalli4704 noo
@@chunchurajeswari7285 did u get solution?
@@vijjuvijju3484 no
sir make videos on apex specialist superbadge
It may take a lot of time, but I will try my best
Thank you so much sir .......
Tqq for perfect code
6 errors are not retifed pls help me bro
Thankyou it really worked I have been trying this for long but it didn't work thanks man
hii getting Invalid interface: ParkServiceMock error in test class
No Apex class named 'ParkService' was found. Ensure the class you generated from the WSDL is named 'ParkService'..
please help me.. this is my error
same
These code has 6 errors 😭
Same problem bro
Thanks❤🙏
please send me code
ParkLocator:
public class ParkLocator {
public static String [] country (String x) {
String parks = x; // {'Yellowstone','Kanha','Mount Fuji'};
ParkService.ParksImplPort findCountries = new ParkService.ParksImplPort ();
return findCountries.byCountry (parks);
}
}
ParkLocatorTest:
@isTest
public class ParkLocatorTest {
@isTest static void testCallout () {
// This causes a fake response to be generated
Test.setMock (WebServiceMock.class, new ParkServiceMock ());
String x ='Yellowstone';
List result = ParkLocator.country (x);
string resultstring = string.join (result,',');
System.assertEquals ('USA', resultstring);
}
}
ParkServiceMock:
@isTest
global class ParkServiceMock implements WebServiceMock {
global void doInvoke (
Object stub,
Object request,
Map response,
String endpoint,
String soapAction,
String requestName,
String responseNS,
String responseName,
String responseType) {
ParkService.byCountryResponse response_x =new ParkService.byCountryResponse ();
response_x.return_x = new List {'USA'};
response.put ('response_x', response_x);
}
}
Executing the 'country' method on 'ParkLocator' failed. Make sure the method exists with the name 'country', is public and static, accepts a String, and returns an array of Strings from the web service.
Bro same here
Same here
@@Sezu_world27 I got the answers there are few steps for this
@@amjadmansoor6115 could you please tell me those steps?
@@amjadmansoor6115 please explain those steps to us
ParkLocator:
public class ParkLocator {
public static String [] country (String x) {
String parks = x; // {'Yellowstone','Kanha','Mount Fuji'};
ParkService.ParksImplPort findCountries = new ParkService.ParksImplPort ();
return findCountries.byCountry (parks);
}
}
ParkLocatorTest:
@isTest
public class ParkLocatorTest {
@isTest static void testCallout () {
// This causes a fake response to be generated
Test.setMock (WebServiceMock.class, new ParkServiceMock ());
String x ='Yellowstone';
List result = ParkLocator.country(x);
string resultstring = string.join (result,',');
System.assertEquals ('USA', resultstring);
}
}
ParkServiceMock:
@isTest
global class ParkServiceMock implements WebServiceMock {
global void doInvoke (
Object stub,
Object request,
Map response,
String endpoint,
String soapAction,
String requestName,
String responseNS,
String responseName,
String responseType) {
ParkService.byCountryResponse response_x =new ParkService.byCountryResponse ();
response_x.return_x = new List {'USA'};
response.put ('response_x', response_x);
}
}
There are 6 errors in these codes
Are you resolve these six errors pls reply
@@fardhinbashamannepalli4704 noo
same
@@chunchurajeswari7285 did u get solution?
@@vijjuvijju3484 no
sir make videos on apex specialist superbadge
It may take a lot of time, but I will try my best
Thank you so much sir .......
Tqq for perfect code