A developer needs to have records with specific field values in order to test a new Apex class. What should the developer do to ensure the data is available to the test?
Suggested Answer: C
Get Premium DEX-450 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
13 comments · newest first
JU
Justine
12 months ago
Definitely prefer creating data with Test.loadData() over manual methods.
TR
Tracie
12 months ago
Wait, can you really use Anonymous Apex for this? Sounds risky!
VE
Verlene
12 months ago
Using static resources for Test.loadData() is pretty neat!
BE
Bettina
1 year ago
Disagree, SOQL queries can be more flexible.
EL
Elke
1 year ago
I think Test.loadData() with a CSV is the way to go!
AI
Ailene
1 year ago
Using Anonymous Apex to create data sounds familiar, but I thought it was more for quick tests rather than structured ones.
BR
Brittni
1 year ago
I feel like Test.loadData() with a static resource could be a good way to ensure consistent test data, but I can't recall the specifics.
GL
Gladys
1 year ago
I'm not entirely sure, but I think using SOQL to query existing data might not be the best choice for tests since it relies on org data.
NI
Nina
1 year ago
I remember practicing with Test.loadData() and using a CSV file for bulk data creation. It seems like a solid option here.
SO
Sonia
1 year ago
Hmm, I'm a bit confused on this one. I know the base station needs a clock source, but I'm not sure which state it would be in if it lost that. I'll have to think this through carefully.
JE
Jennie
1 year ago
I'm not sure about this one. There are a lot of different approaches outlined here, and I'm not sure which one is the "best" according to TOGAF 9. I might need to review the TOGAF principles a bit more to decide which option aligns best with the framework.
KA
Karrie
1 year ago
I kind of remember thinking C was true at one point, but I think I learned that's incorrect since ether can be sent without a function call if the fallback is set right.
MA
Mariann
1 year ago
I've got a good feeling about option D. Switches send syslog messages directly to the destinations, right? That makes the most sense to me.