1 Apexクラス作成する。
public with sharing class Sample {
public Sample() {
}
}
2 Agentforce Vibesに指示する。
Sampleのユニットテストクラスを作成して
3 手順2で作成された内容コピーする。
@isTest
public class SampleTest {
@isTest
static void testSampleConstructor() {
// Arrange & Act
Sample sample = new Sample();
// Assert
System.assertNotEquals(null, sample, 'Sample instance should not be null');
}
}
4 空のApexテストクラスを作成して、手順3でコピーしたコードを貼り付ける。