How to call abstract class methods in Salesforce?

Abstract Class:

public abstract class SampleAbstract
    public Task newTask;
    public void createT(Id caseId, Id accountId)
        newTask = new Task();
    public abstract void methodX();
    public abstract void methodY();

Class extending Abstract class:

public class Sample extends SampleAbstract {  
    public sample() {
    public override void methodX(){
    public override void methodY(){


Test class:

private class AbstractTest{
    static testMethod void test(){
        Sample sa = new Sample();  
        Id caseId;
        Id accountId;
        sa.createT(caseId, accountId);  

No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit