public void GivenTracesForCrosslineShouldCreateOneImage() { // Arrange var trace1 = new MockTrace { Values = new float[] { 99 }, Header = new MockTraceHeader { CrosslineNumber = 1, InlineNumber = 10 } }; var trace2 = new MockTrace { Values = new float[] { 77 }, Header = new MockTraceHeader { CrosslineNumber = 1, InlineNumber = 20 } }; IEnumerable <ITrace> traces = new ITrace[] { trace1, trace2 }; var path = TestPath() + ".jpg"; // Act Subject.Write(traces, path); // Assert BinaryFileAssert.Exists(path); TestContext.AddResultFile(path); var image = new Bitmap(path); Assert.AreEqual(2, image.Width); Assert.AreEqual(1, image.Height); }
public void ImageFromExample() { // Arrange var segy = new SegyReader().Read("lineE.sgy"); var path = TestPath() + ".png"; // Act Subject.Write(segy, path); // Assert BinaryFileAssert.Exists(path); TestContext.AddResultFile(path); }
public void ShouldCreateImageFile() { // Arrange var path = TestPath() + ".png"; ISegyFile segyFile = new Mock <ISegyFile>().Object; // Act Subject.Write(segyFile, path); // Assert BinaryFileAssert.Exists(path); var image = Bitmap.FromFile(path); Assert.AreEqual(1, image.Width); Assert.AreEqual(1, image.Height); }
public void ShouldCreateImageWithGivenTraces() { // Arrange IEnumerable <ITrace> traces = MockTraces2x3(); var path = TestPath() + ".jpg"; // Act Subject.Write(traces, path); // Assert BinaryFileAssert.Exists(path); TestContext.AddResultFile(path); var image = new Bitmap(path); VerifyBitmapFromMockTraces2x3(image); }