Ejemplo n.º 1
0
        public void Execute_WithNoBody_Execute()
        {
            //act
            RestyClient restyClient = new RestyClient(iMscMcomRequestRepositoryMock.Object,
                                                      iRestClientMock.Object);
            var result = restyClient.Execute(0, new Uri(url), restRequest);

            //assert
            Assert.That(result, Is.TypeOf <RestResponse>());
            iMscMcomRequestRepositoryMock.Verify(f => f.Create(It.IsAny <MscMcomRequest>()));
        }
Ejemplo n.º 2
0
        public void Execute_WithBody_Execute()
        {
            restRequest.Parameters.Add(new Parameter()
            {
                Type  = ParameterType.RequestBody,
                Value = "{test=\"1\"}"
            });
            //act
            RestyClient restyClient = new RestyClient(iMscMcomRequestRepositoryMock.Object,
                                                      iRestClientMock.Object);
            var result = restyClient.Execute(0, new Uri(url), restRequest);

            //assert
            Assert.That(result, Is.TypeOf <RestResponse>());
            iMscMcomRequestRepositoryMock.Verify(f => f.Create(It.IsAny <MscMcomRequest>()));
        }