+ Start a Discussion
akhil Vakhil V 

Test class

public class ctrlJQDatePicker {
  public String dateDefaultValue { get;set; }
}
can any one write a test class for this?
thanks in advance
Best Answer chosen by akhil V
Sampath KumarSampath Kumar
Hi Akhil,

Please find the test class below:

@isTest
private class ctrlJQDatePickerTest {
     static testMethod void testing(){
         test.startTest();
    ctrlJQDatePicker  t1 = new ctrlJQDatePicker ();
    t1.dateDefaultValue = 'testing';
         system.assertEquals(t1.dateDefaultValue, 'testing');
         test.stopTest();
    }
}

Mark this as solved if this answers your query.

Regards
Sampath Kumar Goud

All Answers

Sampath KumarSampath Kumar
Hi Akhil,

Please find the test class below:

@isTest
private class ctrlJQDatePickerTest {
     static testMethod void testing(){
         test.startTest();
    ctrlJQDatePicker  t1 = new ctrlJQDatePicker ();
    t1.dateDefaultValue = 'testing';
         system.assertEquals(t1.dateDefaultValue, 'testing');
         test.stopTest();
    }
}

Mark this as solved if this answers your query.

Regards
Sampath Kumar Goud
This was selected as the best answer
akhil Vakhil V
Hi sampath,
Thanks For Help!!
Please clarify My Doubt In Short.Why we write test.startTest() and test.StopTest()?what is the use of this ?Give a real time Example
Thanks in Advance!
Sampath KumarSampath Kumar
Hi Akhil,

Please go through following link for details.

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_tools_start_stop_test.htm

Regards
Sampath Kumar Goud