public SomeResponse GetSome(SomeRequest req) { var response = new SomeResponse { SomeProperty = req.SomeReqProperty, SomeOtherProperty = "someVal" }; return(response); }
public SomeResponse RecorderWrapper_Example(SomeRequest req) { FuncPlayer <SomeRequest, SomeResponse> player = new FuncPlayer <SomeRequest, SomeResponse>("SomeResponse RecorderWrapper(SomeRequest)", new SomeRequestIdentifier(), null); player.StartInvocation(req); switch (player.DetermineTestMode(req)) { case TestModes.NoMock: return(player.CallOriginal(req, GetSome_ExampleClone)); case TestModes.Record: return(player.Record(req, GetSome_ExampleClone)); case TestModes.Play: return(player.Play(req)); default: return(null); } }
public void RecorderVoidWrapper_Example(SomeRequest req) { ActionPlayer <SomeRequest> player = new ActionPlayer <SomeRequest>("SomeResponse RecorderWrapper(SomeRequest)", new SomeRequestIdentifier()); player.StartInvocation(req); switch (player.DetermineTestMode(req)) { case TestModes.NoMock: player.CallOriginal(req, DoSome_ExampleClone); break; case TestModes.Record: player.Record(req, DoSome_ExampleClone); break; case TestModes.Play: player.Play(req); break; default: break; } }
public void DoSome_ExampleClone(SomeRequest req) { int a = 5 * 5; Console.WriteLine(a); }
public SomeResponse GetSome_ExampleClone(SomeRequest req) { return(null); }