Example #1
0
        public SomeResponse GetSome(SomeRequest req)
        {
            var response = new SomeResponse
            {
                SomeProperty      = req.SomeReqProperty,
                SomeOtherProperty = "someVal"
            };

            return(response);
        }
Example #2
0
        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);
            }
        }
Example #3
0
        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;
            }
        }
Example #4
0
        public void DoSome_ExampleClone(SomeRequest req)
        {
            int a = 5 * 5;

            Console.WriteLine(a);
        }
Example #5
0
 public SomeResponse GetSome_ExampleClone(SomeRequest req)
 {
     return(null);
 }