Skip to content

Commit

Permalink
Bug 568620 Update RemoteConditions miner to current FLS protocol
Browse files Browse the repository at this point in the history
Eliminate redundant request query parameter from the corresponding test
as well. Replenish test with new parameters.

Signed-off-by: eparovyshnaya <[email protected]>
  • Loading branch information
eparovyshnaya committed Nov 8, 2020
1 parent 3788a5f commit 3d9775d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection;
import org.eclipse.passage.lic.internal.base.StringNamedData;

final class ServerAuthenticationExpression extends StringNamedData {
public final class ServerAuthenticationExpression extends StringNamedData {

ServerAuthenticationExpression(String value) {
public ServerAuthenticationExpression(String value) {
super(value);
}

ServerAuthenticationExpression(FloatingServerConnection server) {
public ServerAuthenticationExpression(FloatingServerConnection server) {
this(server.getAuthentication().getExpression());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection;
import org.eclipse.passage.lic.internal.base.StringNamedData;

final class ServerAuthenticationType extends StringNamedData {
public final class ServerAuthenticationType extends StringNamedData {

ServerAuthenticationType(String value) {
public ServerAuthenticationType(String value) {
super(value);
}

ServerAuthenticationType(FloatingServerConnection server) {
public ServerAuthenticationType(FloatingServerConnection server) {
this(server.getAuthentication().getType());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
import org.eclipse.passage.lic.internal.api.LicensedProduct;
import org.eclipse.passage.lic.internal.api.LicensingException;
import org.eclipse.passage.lic.internal.api.conditions.ConditionAction;
import org.eclipse.passage.lic.internal.api.conditions.UserRole;
import org.eclipse.passage.lic.internal.api.conditions.mining.ContentType;
import org.eclipse.passage.lic.internal.base.BaseLicensedProduct;
import org.eclipse.passage.lic.internal.base.ProductIdentifier;
import org.eclipse.passage.lic.internal.base.ProductVersion;
import org.eclipse.passage.lic.internal.base.conditions.mining.LicensingContentType;
import org.eclipse.passage.lic.internal.hc.remote.impl.RemoteConditionsRequest;
import org.eclipse.passage.lic.internal.hc.remote.impl.ServerAuthenticationExpression;
import org.eclipse.passage.lic.internal.hc.remote.impl.ServerAuthenticationType;
import org.eclipse.passage.lic.internal.net.LicensingAction;
import org.eclipse.passage.lic.internal.net.LicensingRole;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
Expand All @@ -60,7 +60,8 @@ public void urlContainsAllParameters() throws IOException {
assertTrue(url.getQuery().contains(new ProductIdentifier("any").key())); //$NON-NLS-1$
assertTrue(url.getQuery().contains(new ProductVersion("any").key())); //$NON-NLS-1$
assertTrue(url.getQuery().contains(new LicensingAction(new ConditionAction.Of("any")).key())); //$NON-NLS-1$
assertTrue(url.getQuery().contains(new LicensingRole(new UserRole.Of("any")).key())); //$NON-NLS-1$
assertTrue(url.getQuery().contains(new ServerAuthenticationExpression("any").key())); //$NON-NLS-1$
assertTrue(url.getQuery().contains(new ServerAuthenticationType("any").key())); //$NON-NLS-1$
assertTrue(url.getQuery().contains("user")); //$NON-NLS-1$
assertTrue(url.getQuery().contains(new LicensingContentType(new ContentType.Of("any")).key())); //$NON-NLS-1$
}
Expand Down

0 comments on commit 3d9775d

Please sign in to comment.