Beispiel #1
0
        public RefreshTokenTests()
        {
            _handler = A.Fake <MockHandler>(opt => opt.CallsBaseMethods());

            A.CallTo(() => _handler.SendAsync(HttpMethod.Post, "/api/oauth/token"))
            .ReturnsLazily(() => Success(EmbeddedResource.Read("ResponseData.refresh-token.json")));
        }
        public ConveyancingMatterTests(WebContainerFixture containerFixture, ITestOutputHelper output)
        {
            _containerFixture = containerFixture;
            _output           = output;

            _handler = A.Fake <MockHandler>(opt => opt.CallsBaseMethods());

            A.CallTo(() => _handler.SendAsync(HttpMethod.Get, "/api/rest/actions?id_eq=1&include=actionType,division,division.participant"))
            .ReturnsLazily(() => Success(EmbeddedResource.Read("ResponseData.get-single-action.json")));
            A.CallTo(() => _handler.SendAsync(HttpMethod.Get, "/api/rest/actions?id_in=1,7"))
            .ReturnsLazily(() => Success(EmbeddedResource.Read("ResponseData.list-multiple-actions.json")));
            A.CallTo(() => _handler.SendAsync(HttpMethod.Get, "/api/rest/datacollectionrecordvalues?action=1" +
                                              "&dataCollectionRecord[dataCollection][name_in]=property,convdet,keydates" +
                                              "&dataCollectionField[name_in]=titleref,lotno,planno,plantype,smtdateonly,smttime,purprice,ConveyType" +
                                              "&include=dataCollectionField,dataCollection"))
            .ReturnsLazily(() => Success(EmbeddedResource.Read("ResponseData.get-data-collection-record-values.json")));
            A.CallTo(() => _handler.SendAsync(HttpMethod.Get, "/api/rest/participants"))
            .ReturnsLazily(() => Success(EmbeddedResource.Read("ResponseData.list-participants.json")));
            A.CallTo(() => _handler.SendAsync(HttpMethod.Get, "/api/rest/actionparticipants?action=1&include=participant,participantType"))
            .ReturnsLazily(() => Success(EmbeddedResource.Read("ResponseData.list-actionparticipants.json")));

            A.CallTo(() => _handler.SendAsync(HttpMethod.Post, "/api/rest/v2/workspace"))
            .ReturnsLazily(() => Success(EmbeddedResource.Read("ResponseData.create-workspace-success.xml")));
        }