Пример #1
0
        public FooResponse RecorderWrapperWithArgs_Example(int i, string s, float f)
        {
            FuncPlayer <int, string, float, FooResponse> player = new FuncPlayer <int, string, float, FooResponse>("SomeResponse RecorderWrapper(SomeRequest)", new GetFooArgsIdentifier(), null);

            player.StartInvocation(i, s, f);

            switch (player.DetermineTestMode(i, s, f))
            {
            case TestModes.NoMock:
                return(player.CallOriginal(i, s, f, GetFooWithTooManyArgs_ExampleClone));

            case TestModes.Record:
                return(player.Record(i, s, f, GetFooWithTooManyArgs_ExampleClone));

            case TestModes.Play:
                return(player.Play(i, s, f));

            default:
                return(null);
            }
        }
Пример #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);
            }
        }