All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.approvaltests.writers.FileApprovalWriter Maven / Gradle / Ivy

There is a newer version: 24.9.0
Show newest version
package org.approvaltests.writers;

import com.spun.util.io.FileUtils;
import org.approvaltests.core.ApprovalWriter;

import java.io.File;

public class FileApprovalWriter implements ApprovalWriter
{
  private final File newFile;
  private String     extensionWithDot;
  public FileApprovalWriter(File newFile)
  {
    this.newFile = newFile;
    extensionWithDot = FileUtils.getExtensionWithDot(newFile.getName());
  }
  @Override
  public File writeReceivedFile(File received)
  {
    return newFile;
  }
  @Override
  public String getFileExtensionWithDot()
  {
    return extensionWithDot;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy