Back
Does Apex support the concept of lambdas?
Ultimately, I am trying to DRY up some really repetitive code in my tests, so I'd love to be able to pass functions around, something like this (C#-esq).
public static TestMethod void some_test_method(){ Arrange( ()=> // some setup stuff ); Act( ()=> // test action ); System.assertEquals(...);}
public static TestMethod void some_test_method(){
Arrange( ()=>
// some setup stuff
);
Act( ()=>
// test action
System.assertEquals(...);
}
31k questions
32.8k answers
501 comments
693 users