asserestFtpSetup function

void asserestFtpSetup({
  1. bool counter = false,
})

Quick setup method for automatically binding FtpPropertyParseProcessor and AsserestFtpTestPlatform into AsserestPropertyParser and AsserestTestAssigner respectively.

This method must be callel at ONCE only, calling multiple time will throw StateError to prevent duplicated input, even though you have been removed those PropertyParseProcessor and AsserestTestPlatform already.

Implementation

void asserestFtpSetup({bool counter = false}) {
  if (_asserestFtpSetup) {
    throw StateError(
        "This method should be call once only. If you removed property parse processor or test platform, please add them manually.");
  }

  _asserestFtpSetup = true;
  AsserestPropertyParser().define(FtpPropertyParseProcessor());
  AsserestTestAssigner().assign(
      AsserestFtpProperty,
      (property) => AsserestFtpTestPlatform(property as AsserestFtpProperty,
          counter: counter));
}