public async Task OutputsTheSameAsInput() { // Given MemoryStream fileStream = GetTestFileStream("logo-square.png"); TestDocument document = new TestDocument( new FilePath("/input/a/b/test.png"), fileStream); MutateImage module = new MutateImage(); // When TestDocument result = await ExecuteAsync(document, module).SingleAsync(); // Then result.Destination.FullPath.ShouldBe("a/b/test.png"); }
public async Task ChangesPathWhenBrightnessSpecified() { // Given MemoryStream fileStream = GetTestFileStream("logo-square.png"); TestDocument document = new TestDocument( new FilePath("/input/a/b/test.png"), fileStream); MutateImage module = new MutateImage().Brightness(123); // When TestDocument result = await ExecuteAsync(document, module).SingleAsync(); // Then result.Destination.FullPath.ShouldBe("a/b/test-b123.png"); }
public async Task ChangesPathWhenOutputFormatSpecified() { // Given MemoryStream fileStream = GetTestFileStream("logo-square.png"); TestDocument document = new TestDocument( new NormalizedPath("/input/a/b/test.png"), fileStream); MutateImage module = new MutateImage().OutputAsGif(); // When TestDocument result = await ExecuteAsync(document, module).SingleAsync(); // Then result.Destination.FullPath.ShouldBe("a/b/test.gif"); }