Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }
Exemplo n.º 8
0
 protected abstract ICalculatorClientAsync CreateClient(CalculatorClientStub clientStub);
 protected override ICalculatorClientAsync CreateClient(CalculatorClientStub clientStub)
 {
     return(new CalculatorClientWithActivity(clientStub, ClientEventSource.Instance, Guid.Empty));
 }
Exemplo n.º 10
0
 protected abstract ICalculatorClientAsync CreateClient(CalculatorClientStub clientStub);