@Test void testValidatePackageValidNameNoParent() { Package package_ = when(mock(Package.class).getId()).thenReturn("myPackage").getMock(); when(package_.getParent()).thenReturn(null); packageValidator.validate(package_, ValidationMode.ADD); }
public void validate(Package aPackage, ValidationMode validationMode) { validatePackageAllowed(aPackage, validationMode); runAsSystem(() -> validatePackageParent(aPackage)); }
PackageValidator { public void validate(Package aPackage, ValidationMode validationMode) { validatePackageAllowed(aPackage, validationMode); runAsSystem(() -> validatePackageParent(aPackage)); } }
PackageValidator { public void validate(Package aPackage, ValidationMode validationMode) { validatePackageAllowed(aPackage, validationMode); runAsSystem(() -> validatePackageParent(aPackage)); } PackageValidator(SystemPackageRegistry systemPackageRegistry); }
PackageValidator { public void validate(Package aPackage, ValidationMode validationMode) { validatePackageAllowed(aPackage, validationMode); runAsSystem(() -> validatePackageParent(aPackage)); } PackageValidator(SystemPackageRegistry systemPackageRegistry); void validate(Package aPackage, ValidationMode validationMode); }
PackageValidator { public void validate(Package aPackage, ValidationMode validationMode) { validatePackageAllowed(aPackage, validationMode); runAsSystem(() -> validatePackageParent(aPackage)); } PackageValidator(SystemPackageRegistry systemPackageRegistry); void validate(Package aPackage, ValidationMode validationMode);  }