Reply
Regular Contributor
nani@r
Posts: 55
0
Accepted Solution

How to use @istest?

Hai  iam confused about @istest class program can u tell about that with example 

Super Contributor
rov
Posts: 571
0

Re: How to use @istest?

@isTest is an indicator that the code in the class or the code inside a method is written for testing the application.

 

For examples you can read these articles/blogs -



http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation_isTest.htm
http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-%E2%80%93-creating-trigger-and-...

Certified Salesforce Developer
Regular Contributor
nani@r
Posts: 55
0

Re: How to use assert?

thanx for ur information i have one more doubt about "assert" .pls help me about  "assert".

Regular Contributor
nani@r
Posts: 55
0

Re: how to execute dlete statment in program?

@istest
private class TestTriggers {

static testMethod void myUnitTest() {

Course__c c = new Course__c();

c.Name = 'SFDC........';

c.Fee__c = 20000000;

delete c;
}
}

i have this program but i can't delete that record pls help me for delete record . i want to delete record how can i aproach throw delete statement 

Super Contributor
Devendra@SFDC
Posts: 720
0

Re: how to execute dlete statment in program?

To delete the record, you first need to write insert statement.

 

Once the record is inserted then you can perform delete operation.

 

System.assert : http://th3silverlining.com/2010/09/07/salesforce-system-assert-vs-system-assertequals/

 

Hope this helps :)

 

Thanks,

Devendra

Thanks,
Devendra
Regular Contributor
nani@r
Posts: 55
0

Re: can u help me about related lists ?

thanx for ur great information .pls teach me about related lists in salesforce 

Regular Contributor
nani@r
Posts: 55
0

actually i am doing shopping mall project. in that i crea...

actually i am doing shopping mall project. in that i created data model about project.but in the goods i want to less today's sales records of the products.In product object i have taken some fields like jewelry,clothing store , coffee shop, electronics .these products have stock object, in dat object i stored some products. now i want to see net available stock.   

Regular Contributor
nani@r
Posts: 55
0

Re: how we execute batchapex ?

how we execute batchapex in developer console can u reply me 

Super Contributor
rov
Posts: 571
0

Re: how we execute batchapex ?

@Nani, Your last two questions are new and unrelated to the original question. It's best to post these questions in new thread. By posting in the same thread, everyone may not read the questions and also it's a bit confusing to follow through.

 

 

Certified Salesforce Developer
Regular Contributor
nani@r
Posts: 55
0

thanx

thanx