//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldReturnMaxDepth1WithWholeSearchArea() internal virtual void ShouldReturnMaxDepth1WithWholeSearchArea() { SpaceFillingCurveConfiguration standardConfiguration = new StandardConfiguration(); SpaceFillingCurveConfiguration partialOverlapConf = new PartialOverlapConfiguration(); // search area is a line, thus having a search area = 0 Envelope range = new Envelope(-180, 180, -90, 90); assertThat(partialOverlapConf.MaxDepth(range, range, 2, 30), equalTo(1)); assertThat(standardConfiguration.MaxDepth(range, range, 2, 30), equalTo(1)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHandleMaxDepthWithEmptySearchArea() internal virtual void ShouldHandleMaxDepthWithEmptySearchArea() { SpaceFillingCurveConfiguration standardConfiguration = new StandardConfiguration(); SpaceFillingCurveConfiguration partialOverlapConf = new PartialOverlapConfiguration(); // search area is a line, thus having a search area = 0 Envelope search = new Envelope(-180, -180, -90, 90); Envelope range = new Envelope(-180, 180, -90, 90); // We pad the line to a small area, but we don't expect to go deeper than level 20 // which would take too long int maxLevel = 20; assertThat(partialOverlapConf.MaxDepth(search, range, 2, 30), lessThan(maxLevel)); assertThat(standardConfiguration.MaxDepth(search, range, 2, 30), lessThan(maxLevel)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldReturnAppropriateDepth() internal virtual void ShouldReturnAppropriateDepth() { const int maxLevel = 30; for (int i = 0; i < maxLevel; i++) { SpaceFillingCurveConfiguration standardConfiguration = new StandardConfiguration(); SpaceFillingCurveConfiguration partialOverlapConf = new PartialOverlapConfiguration(); // search area is a line, thus having a search area = 0 Envelope range = new Envelope(0, 1, 0, 1); Envelope search = new Envelope(0, Math.Pow(2, -i), 0, Math.Pow(2, -i)); assertThat(partialOverlapConf.MaxDepth(search, range, 2, maxLevel), equalTo(i + 1)); assertThat(standardConfiguration.MaxDepth(search, range, 2, maxLevel), equalTo(i + 1)); } }