Class FrontendStubs.ToolStubBuilder

java.lang.Object
com.vaadin.flow.testutil.FrontendStubs.ToolStubBuilder
Enclosing class:
FrontendStubs

public static class FrontendStubs.ToolStubBuilder extends Object
Builds a new instance of FrontendStubs.ToolStubInfo.
  • Method Details

    • withVersion

      public FrontendStubs.ToolStubBuilder withVersion(String version)
      Adds a stub for tool version. The version will be returned if a tool executable is called with '-v' or '--version' argument. If no value is set, the default one is used.
      Parameters:
      version - a tool version to stub.
      Returns:
      a tool stub info builder.
    • withCacheDir

      public FrontendStubs.ToolStubBuilder withCacheDir(String cacheDir)
      Adds a stub for npm cache directory. The path to cache will be returned if a tool executable is called with 'cache' argument. If no value is set, the default one is used.
      Parameters:
      cacheDir - a npm cache dir to stub.
      Returns:
      a tool stub info builder.
    • build

      Builds a new instance of tool stub info.
      Returns:
      a new tool stub info instance.