Skip to content

Instantly share code, notes, and snippets.

@ZergyPoo
ZergyPoo / DemoMapper.cls
Created November 22, 2023 01:39
Stub/Singleton Pattern
public virtual class DemoMapper {
@TestVisible
private static DemoMapper instance;
protected DemoMapper() {}
public static DemoMapper getInstance() {
if (instance != null) {
return instance;
public class OrderBy {
@TestVisible
private String orderDirection;
private String fieldName;
public OrderBy(String orderDirection, String fieldName) {
this.orderDirection = orderDirection;
this.fieldName = fieldName;