Questions tagged [test-class]

66 questions
-1
votes
2 answers

How to discover the reason for an error in my simple test class?

This is my aura method to retrieve fields for dual list box. @AuraEnabled public static List getProperties(sObject objObject, string sFieldAPI) { List < String > lstOptions = new list < String > (); …
-1
votes
1 answer

Writing Test class for Currency Conversion Trigger

I need little assistance in writing a test class for this trigger that converts the record currency to org currency. Can anyone please assist/guide? Please. trigger convertToEuro on CustomObject (before update) { List
khosla
  • 29
  • 1
  • 6
-1
votes
1 answer

Code Coverage Repeated Apex classes

We are having an issue , where when we run all tests we see some classes repeated. These classes that are repeated are actually incorrectly labeled classes. Example: Class A and Class B. Run all tests and code coverage shows that Class A has 90%…
-1
votes
1 answer

Apex trigger zero code coverage

Can anyone please help me to solve my issue. I have created apex trigger with test classes. I am not getting any error after test run but unable to getting any code coverage. Please check below is my apex trigger and test class. …
Nayana
  • 3
  • 3
-1
votes
1 answer

how to implement methods in a test class?

I made this class but I cannot find a way to make the test class and implement the methods I used. public class Battery { private float fullCharge = 3000; private float batteryCapacity; public Battery (float capacity) …
Samled
  • 3
  • 2
-3
votes
1 answer

I am writing test class for Apex batch but I am getting just 35% test coverage

I am writing test class for Apex batch but I am getting just 35% test coverage. Can someone please help me with that? Main Class global class Emailalertbatchclass implements Database.Batchable\, Schedulable, Database.Stateful { …
1 2 3 4
5