I am working on some email automation and I have a separate test class for each language, kind of like this:
@isTest public class EnglishEmailTest {
@isTest public static void test1() {
...
}
...
}
@isTest public class GermanEmailTest {
@isTest public static void test1() {
...
}
...
}
@isTest public class SpanishEmailTest {
@isTest public static void test1() {
...
}
...
}
I am trying to get these tests to work all together in another class. It would look something like this:
@isTest public class AllEmailTest {
@isTest public static void testAll() {
EnglishEmailTest.test1();
...
GermanEmailTest.test1();
...
SpanishEmailTest.test1();
...
}
}
I currently have something similar to this set up, but I keep getting DMLExceptions:
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []
The weird thing is that they all work fine separately, but once I combine them into one test class it causes problems.
Is there something I'm doing wrong?