You need to sign in to do that
Don't have an account?
BobP
First exception on row 0; first error: ENTITY_IS_DELETED
I have a test class that is giving me an error I've never seen before. When I try to send it over to my production org via outbound change set and then validated it via inbound change set I receive the error below.
My test class is also below. any help i can get wuold be appreciated.
System.DmlException: Insert failed. First exception on row 0; first error: ENTITY_IS_DELETED, entity is deleted: [] Stack Trace: Class.Test_YushProdFileUpload.testAttachments: line 38, column 1
My test class is also below. any help i can get wuold be appreciated.
/** * This class contains unit tests for validating the behavior of Apex classes * and triggers. * * Unit tests are class methods that verify whether a particular piece * of code is working properly. Unit test methods take no arguments, * commit no data to the database, and are flagged with the testMethod * keyword in the method definition. * * All test methods in an organization are executed whenever Apex code is deployed * to a production organization to confirm correctness, ensure code * coverage, and prevent regressions. All Apex classes are * required to have at least 75% code coverage in order to be deployed * to a production organization. In addition, all triggers must have some code coverage. * * The @isTest class annotation indicates this class only contains test * methods. Classes defined with the @isTest annotation do not count against * the organization size limit for all Apex scripts. * * See the Apex Language Reference for more information about Testing and Code Coverage. */ @isTest private class Test_YushProdFileUpload { static testMethod void testAttachments() { Yushin_Product__c ypd=new Yushin_Product__c(Discharge_Direction__c='Clamp Traverse'); ypd.Opportunity__c='0063900000rYAez'; ypd.Account__c ='0013900001dOm8T'; ypd.Discharge_Direction__c='Clamp Traverse'; ypd.IMM_Mfr__c='Arburg'; ypd.IMM_Model__c='NT450'; ypd.Plant_Voltage__c='110'; ypd.Interface_Voltage__c='110 VDC'; insert ypd; ypd.Opportunity__c='0063900000rYAez'; ypd.Account__c ='0013900001dOm8T'; ypd.Discharge_Direction__c='Clamp Traverse'; ypd.IMM_Mfr__c='Engel'; ypd.IMM_Model__c='110t'; ypd.Plant_Voltage__c='110'; ypd.Interface_Voltage__c='110 VDC'; update ypd; VRController_YProdFileUpload controller=new VRController_YProdFileUpload(new ApexPages.StandardController(ypd)); controller.fileName='Unit Test Attachment'; controller.fileBody=Blob.valueOf('Unit Test Attachment Body'); controller.uploadFile(); List<Attachment> attachments=[select id, name from Attachment where parent.id=:ypd.id]; System.assertEquals(1, attachments.size()); } }
All Answers
Thank you for helping. I am getting the following error when compiling the code.
Error: Compile Error: Missing closing quote character ' on string. at line 71 column 66. But it looks like it is there
Thank you