예제 #1
0
        public void SquareRoot_with_events_calls_inner()
        {
            CalculatorClientStub clientStub = new CalculatorClientStub();
            clientStub.Results.Enqueue(8.0d);
            ICalculatorClientAsync client = this.CreateClient(clientStub);

            VerifyResult(8.0d, client.SquareRootAsync(7.0d));
            clientStub.VerifyOperation("SquareRoot", 7.0d, 0.0d);
        }
예제 #2
0
        public void Subtract_with_events_calls_inner()
        {
            CalculatorClientStub clientStub = new CalculatorClientStub();
            clientStub.Results.Enqueue(4.0d);
            ICalculatorClientAsync client = this.CreateClient(clientStub);

            VerifyResult(4.0d, client.SubtractAsync(5.0d, 6.0d));
            clientStub.VerifyOperation("Subtract", 5.0d, 6.0d);
        }
예제 #3
0
        public void Add_with_events_calls_inner()
        {
            CalculatorClientStub clientStub = new CalculatorClientStub();
            clientStub.Results.Enqueue(1.0d);
            ICalculatorClientAsync client = this.CreateClient(clientStub);

            VerifyResult(1.0d, client.AddAsync(2.0d, 3.0d));
            clientStub.VerifyOperation("Add", 2.0d, 3.0d);
        }
예제 #4
0
        public void SquareRoot_with_events_calls_inner()
        {
            CalculatorClientStub clientStub = new CalculatorClientStub();

            clientStub.Results.Enqueue(8.0d);
            ICalculatorClientAsync client = this.CreateClient(clientStub);

            VerifyResult(8.0d, client.SquareRootAsync(7.0d));
            clientStub.VerifyOperation("SquareRoot", 7.0d, 0.0d);
        }
예제 #5
0
        public void Subtract_with_events_calls_inner()
        {
            CalculatorClientStub clientStub = new CalculatorClientStub();

            clientStub.Results.Enqueue(4.0d);
            ICalculatorClientAsync client = this.CreateClient(clientStub);

            VerifyResult(4.0d, client.SubtractAsync(5.0d, 6.0d));
            clientStub.VerifyOperation("Subtract", 5.0d, 6.0d);
        }
예제 #6
0
        public void Add_with_events_calls_inner()
        {
            CalculatorClientStub clientStub = new CalculatorClientStub();

            clientStub.Results.Enqueue(1.0d);
            ICalculatorClientAsync client = this.CreateClient(clientStub);

            VerifyResult(1.0d, client.AddAsync(2.0d, 3.0d));
            clientStub.VerifyOperation("Add", 2.0d, 3.0d);
        }
 protected override ICalculatorClientAsync CreateClient(CalculatorClientStub clientStub)
 {
     return new CalculatorClientWithActivity(clientStub, ClientEventSource.Instance, Guid.Empty);
 }
예제 #8
0
 protected abstract ICalculatorClientAsync CreateClient(CalculatorClientStub clientStub);
 protected override ICalculatorClientAsync CreateClient(CalculatorClientStub clientStub)
 {
     return(new CalculatorClientWithActivity(clientStub, ClientEventSource.Instance, Guid.Empty));
 }
예제 #10
0
 protected abstract ICalculatorClientAsync CreateClient(CalculatorClientStub clientStub);