kazurayam / materialstore

A domain-specific file system to store "materials" (screenshots, HTML, JSON, XML) collected during End-to-End testings using Selenium WebDriver etc. Features to make "diff" and compiling HTML reports are also included. This is written in pure Java8
Apache License 2.0
0 stars 0 forks source link

ImageDifferToPng#complementMaterialAsImage() is questionable #419

Closed kazurayam closed 1 year ago

kazurayam commented 1 year ago

com.kazurayam.materialstore.base.reduce.differ.ImageDifferToPNG has the lines:

@Override
    public MaterialProduct stuffDiff(MaterialProduct mProduct) throws MaterialstoreException {
        ...
        Material left = complementMaterialAsImage(store, mProduct, mProduct.getLeft());
        BufferedImage leftImage = readImage(left.toPath());
        ...

v0.16.0, the complementMaterialAsImage() returns an instance of Material.

But now I think that this method should rather return an instance of Buffered Image. So that I can rewrite the above section as

@Override
    public MaterialProduct stuffDiff(MaterialProduct mProduct) throws MaterialstoreException {
        ...
        BufferedImage leftImage = complementMaterialAsImage(store, mProduct, mProduct.getLeft());
        ...
kazurayam commented 1 year ago

This idea was pointless.