public async void GetSimPlansForProject_ValidProjectId_ReturnsSimPlanModelList()
        {
            // Arrange
            var projectId     = "623be379-ed40-49f3-bdd8-416f8cd0faa6";
            var httpService   = new HttpService(new HttpClient());
            var simPlanClient = new SimPlanClient(
                httpService
                );

            // Act
            var result = await simPlanClient.GetSimPlansForProject(projectId);

            // Assert
            Assert.NotEmpty(result);
        }
Пример #2
0
        public async void GetSimPlansForProject_OkStatusCode_ReturnsSimPlanModelList()
        {
            // Arrange
            var httpResponseMessage = new HttpResponseMessage
            {
                StatusCode = HttpStatusCode.OK,
                Content    = new StringContent(SimPlanModelDataMocks.MockSimPlanModelListJson)
            };
            var httpService = new Mock <IHttpService>();

            httpService
            .Setup(m => m.GetAsync(It.IsAny <string>()))
            .ReturnsAsync(httpResponseMessage);
            var simPlanClient = new SimPlanClient(httpService.Object);

            // Act
            var result = await simPlanClient.GetSimPlansForProject(It.IsAny <string>());

            // Assert
            Assert.NotEmpty(result);
        }