You need to sign in to do that
Don't have an account?

Test Coverage
When I run the test below, I get a message that the List has no rows for assignment. When I manually run the query I get a single row returned.
@isTest private class AssetItemTriggerHandlerTest { static testMethod void AssetItemTriggerTest() { //getting any valid Asset Asset testAsset = [select Id, SD_Account_Number__c, Name, Status, PurchaseDate, Renewal_Date__c, AccountId from Asset where Status='Regular' limit 1]; test.startTest(); update testAsset; test.stopTest(); } }
You need to insert the test data before you run that query. Because you are running an API version greater than 24. You can get around this by enabling SeeAllData for your test, but that is the wrong way to do it.