public void GetDepthResolution__uses_origin_and_returns_correct_value() { var pixel = (new[] { new Pixel(51, 71), new Pixel(52, 73), new Pixel(53, 75), new Pixel(54, 80), new Pixel(55, 71), new Pixel(56, 71), new Pixel(57, 71), new Pixel(58, 71) }).ToList(); var dive = new Dive(2, 30, 2, "image"); var fac = new SampleFactory(); var ret1 = fac.GetDepthResolution(pixel, dive); ret1.Should().Be(3); }
public void GetDepthResolution__wont_fail_on_null_or_empty() { var dive = new Dive(1, 1, 2, "image"); var fac = new SampleFactory(); var ret1 = fac.GetDepthResolution(null, null); var ret2 = fac.GetDepthResolution(new List<Pixel> { }, null); ret1.Should().Be(-1); ret2.Should().Be(-1); }
public void GetDepthResolution__returns_correct_value_with_rounding_up() { var pixel = (new[] { new Pixel(1, 1), new Pixel(2, 16), new Pixel(3, 15), new Pixel(4, 10), new Pixel(5, 1), new Pixel(6, 1), new Pixel(7, 1), new Pixel(8, 1) }).ToList(); var dive = new Dive(2, 30, 2, "image"); var fac = new SampleFactory(); var ret1 = fac.GetDepthResolution(pixel, dive); ret1.Should().Be(2); }