예제 #1
0
        public void GetAllEnrollmentsTest()
        {
            EnrollmentNpisResponses actualResponse = enrollment.GetAll();

            string expectedResponse = TestHelper.GetJson(TestResource.ExpectedResponse + "AllEnrollments.json");

            TestHelper.CompareProperties(expectedResponse, JsonConvert.SerializeObject(actualResponse));
        }
        public void GetAllEnrollmentsTest()
        {
            EnrollmentNpisResponses actualResponse = enrollment.GetAll();

            string expectedResponse = TestHelper.GetJson(TestResource.ExpectedResponse + "AllEnrollments.json");

            TestHelper.CompareProperties(expectedResponse, actualResponse.JsonResponse());

            EnrollmentNpisResponses expectedObj = JsonConvert.DeserializeObject <EnrollmentNpisResponses>(expectedResponse);
            EnrollmentNpisResponses actualObj   = JsonConvert.DeserializeObject <EnrollmentNpisResponses>(actualResponse.JsonResponse());

            TestHelper.PropertyValuesAreEquals(actualObj, expectedObj);
        }
예제 #3
0
        public void GetAllEnrollments()
        {
            restClient.Setup(x => x.Execute(It.IsAny <string>(), It.IsAny <RequestOptions>(), It.IsAny <Hashtable>()))
            .Returns(new RestResponse()
            {
                StatusCode = HttpStatusCode.OK,
                Content    = TestHelper.GetJson(TestResource.MocksPath + "EnrollmentList.json")
            });

            enrollment.ExecuteObj = restClient.Object;

            var response = enrollment.GetAll();

            Fixture fixture             = new Fixture();
            EnrollmentNpisResponses sut = fixture.Create <EnrollmentNpisResponses>();

            TestHelper.PropertiesAreEqual(sut, response.JsonResponse());
        }