コード例 #1
0
        public async Task GetGraphImportStatus_Success()
        {
            // Arrange
            var expectedResponse = new NeptuneLoaderStatusResponse {
                Status = "200 OK", LoadStatus = "LOAD_COMPLETED", StartTime = "1598252845"
            };

            _mockNeptuneLoaderConnector.Setup(x => x.GetStatus(It.IsAny <Guid>())).ReturnsAsync(expectedResponse);

            // Act
            var result = await _service.GetGraphImportStatus(It.IsAny <Guid>());

            // Assert
            Assert.NotNull(result);
            Assert.Equal(expectedResponse.Status, result.Status);
            Assert.Equal(expectedResponse.LoadStatus, result.LoadStatus);
            Assert.Equal(expectedResponse.StartTime, result.StartTime);
        }
コード例 #2
0
        public async Task <IActionResult> GetGraphUploadStatus(Guid loadId)
        {
            var status = await _graphService.GetGraphImportStatus(loadId);

            return(Ok(status));
        }