public async Task Test_PatchRequest_Execute_SingleTAGFileSiteModel() { AddApplicationGridRouting(); AddClusterComputeGridRouting(); var tagFiles = new[] { Path.Combine(TestHelper.CommonTestDataPath, "TestTAGFile.tag"), }; var siteModel = DITAGFileAndSubGridRequestsFixture.BuildModel(tagFiles, out _); var request = new PatchRequest(); var response = await request.ExecuteAsync(SimplePatchRequestArgument(siteModel.ID)); response.Should().NotBeNull(); response.SubGrids.Should().NotBeNull(); response.SubGrids.Count.Should().Be(12); response.SubGrids.ForEach(x => x.Should().BeOfType <ClientHeightAndTimeLeafSubGrid>()); int nonNullCellCount = 0; response.SubGrids.ForEach(x => nonNullCellCount += ((ClientHeightAndTimeLeafSubGrid)x).CountNonNullCells()); nonNullCellCount.Should().Be(3054); }
public async Task Test_PatchRequest_Execute_EmptySiteModel() { AddApplicationGridRouting(); var siteModel = DITAGFileAndSubGridRequestsWithIgniteFixture.NewEmptyModel(); var request = new PatchRequest(); var response = await request.ExecuteAsync(SimplePatchRequestArgument(siteModel.ID)); response.Should().NotBeNull(); response.SubGrids.Should().BeNull(); }
public async Task Test_PatchRequest_Execute_SingleCellSiteModel() { AddApplicationGridRouting(); AddClusterComputeGridRouting(); var siteModel = BuildModelForSingleCellPatch(HEIGHT_INCREMENT_0_5); var request = new PatchRequest(); var response = await request.ExecuteAsync(SimplePatchRequestArgument(siteModel.ID)); response.Should().NotBeNull(); response.SubGrids.Should().NotBeNull(); response.SubGrids.Count.Should().Be(1); response.SubGrids[0].CountNonNullCells().Should().Be(1); response.SubGrids[0].Should().BeOfType <ClientHeightAndTimeLeafSubGrid>(); ((ClientHeightAndTimeLeafSubGrid)response.SubGrids[0]).Cells[0, 0].Should().BeApproximately(5.5f, 0.000001f); }