Example #1
0
        public void GetClickWrap_WhenClickWrapExists_ReturnsCorrectResponse()
        {
            //Arrange
            _restClient
            .Setup(x => x.Execute(It.IsAny <IRestRequest>(), Method.GET))
            .Returns(new RestResponse
            {
                Content =
                    "{\"clickwraps\":[{\"clickwrapId\":\"1\",\"clickwrapName\":\"TermsAndConditions\",\"status\":\"active\"}]}",
                StatusCode = HttpStatusCode.OK
            });

            //Act
            ClickWrap response = _sut.GetClickWrap(AccountId);

            //Assert
            response.Should().BeEquivalentTo(
                new ClickWrap
            {
                ClickwrapId   = "1",
                ClickwrapName = "TermsAndConditions",
                Status        = "active"
            });
        }