public void ShouldExponentiate2Fractions()
        {
            FractionPowerRequest request = new FractionPowerRequest
            {
                Fraction = new FractionModel
                {
                    Numerator = 2,
                    Denominator = 3
                },
                Power = 3
            };

            _service.Expect(service => service.Pow(Arg<Fraction>.Is.Anything, Arg<int>.Is.Anything))
                .Return(new Fraction(16, 27));

            var fractionResponse = _controller.Power(request) as OkNegotiatedContentResult<FractionResponse>;

            _service.VerifyAllExpectations();

            Assert.IsNotNull(fractionResponse);
            Assert.AreEqual(16, fractionResponse.Content.Fraction.Numerator);
            Assert.AreEqual(27, fractionResponse.Content.Fraction.Denominator);
        }
        public FractionResponse Power(int numerator, int denominator, int power)
        {
            FractionModel fraction = new FractionModel
            {
                Numerator = numerator,
                Denominator = denominator
            };

            FractionPowerRequest fractionRequest = new FractionPowerRequest
            {
                Fraction = fraction,
                Power = power
            };

            var request = new RestRequest("api/Fractions/Power", Method.POST) { RequestFormat = DataFormat.Json };
            request.AddBody(fractionRequest);

            var response = _client.Execute<FractionResponse>(request);

            if (response.StatusCode != HttpStatusCode.OK)
                throw new Exception(response.ErrorMessage);

            return response.Data;
        }