Esempio n. 1
0
        public void DoNoArgsNoResponse_Example()
        {
            ActionPlayer playerVoid = new ActionPlayer("System.Void AssemblyToProcess.SomeClient::DoNoArgsNoResponse()", (IRequestIdentifier)null);

            playerVoid.StartInvocation();
            switch (playerVoid.DetermineTestMode())
            {
            case TestModes.NoMock:
                playerVoid.CallOriginal(new Action(this.DoNoArgsNoResponse_ExampleClone));
                break;

            case TestModes.Record:
                playerVoid.Record(new Action(this.DoNoArgsNoResponse_ExampleClone));
                break;

            case TestModes.Play:
                playerVoid.Play();
                break;
            }
        }
Esempio n. 2
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;
            }
        }