function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srikanth kambampati 6srikanth kambampati 6 

Hi all, i wrote one program to display the current dollar rate

This is my program,
public class Currency_Layer {
    public String result      {set;get;}
    
    public void getCurrency() {
        Http p =new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('callout:Currency_Layer');
        request.setMethod('GET');
        HttpResponse response = p.send(request);
        result = response.getBody();
}
}

and My VF page is
<apex:page controller="Currency_Layer">
    <apex:form >
        <apex:commandButton value="Currency" action="{!getCurrency}"/>
        {!result}
     </apex:form>
</apex:page>

then , how write the test class for above code. please help me,