Back to Browse

Test Apex Triggers | Apex Testing

7.1K views
Nov 1, 2022
8:06

#salesforce #trailhead #salestraining #apex Test Apex Triggers Create a Unit Test for a Simple Apex Trigger Create and install a simple Apex trigger which blocks inserts and updates to any contact with a last name of 'INVALIDNAME'. You'll copy the code for the class from GitHub. Then write unit tests that achieve 100% code coverage. Create an Apex trigger on the Contact object Name: RestrictContactByName Code: Copy from GitHub Place the unit tests in a separate test class Name: TestRestrictContactByName Goal: 100% test coverage Run your test class at least once 00:00 Introduction 00:25 Apex Class 04:54 Coading

Download

0 formats

No download links available.

Test Apex Triggers | Apex Testing | NatokHD