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.
@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.
@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-test-cases-%E2%80%93-6-of-6/
All Answers
@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-test-cases-%E2%80%93-6-of-6/
thanx for ur information i have one more doubt about "assert" .pls help me about "assert".
@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
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
thanx for ur great information .pls teach me about related lists in salesforce
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.
how we execute batchapex in developer console can u reply me
@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.
thanx
generally we use the assert in the test classes...'assertEquals' is used to compare the required field value with field or variable...
standard syntax is
system.assertEquals('field value', fieldname/variable name);