Skip to content

Instantly share code, notes, and snippets.

@ssukhpinder
Created June 12, 2021 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssukhpinder/6bcb837749e13c264260e64fc3c33b15 to your computer and use it in GitHub Desktop.
Save ssukhpinder/6bcb837749e13c264260e64fc3c33b15 to your computer and use it in GitHub Desktop.
ClaimApprover junior = new Manager();
ClaimApprover sukhpinder = new Manager();
ClaimApprover singh = new SeniorManager();
junior.SetHierarchy(sukhpinder);
sukhpinder.SetHierarchy(singh);
Claim c1 = new Claim() { amount = 999, Id = 1001 };
Claim c2 = new Claim() { amount = 10001, Id = 1002 };
junior.ApproveRequest(c1);
sukhpinder.ApproveRequest(c2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment