Skip to content

Commit

Permalink
addressing converter cleanup as per #7 - removed string text
Browse files Browse the repository at this point in the history
  • Loading branch information
logscape committed Jan 20, 2020
1 parent 24fe69e commit 7d4cdef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.logscapeng.uploader.FileMetaDataQueryService;
import com.logscapeng.uploader.fixture.FixturedFileMetaDataQueryService;
import com.logscapeng.uploader.fixture.FixturedStorageService;
import io.quarkus.runtime.LaunchMode;
import org.eclipse.microprofile.config.spi.Converter;

/**
Expand All @@ -11,7 +12,7 @@
public class AwsMetaDataQueryConverter implements Converter<FileMetaDataQueryService> {
@Override
public FileMetaDataQueryService convert(String s) {
if (s.equalsIgnoreCase("TEST")) {
if (s.equalsIgnoreCase(LaunchMode.TEST.name())) {
return new FixturedFileMetaDataQueryService();
}
return new AwsFileMetaDataQueryService();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import com.logscapeng.uploader.Storage;
import com.logscapeng.uploader.fixture.FixturedStorageService;
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.configuration.ProfileManager;
import org.eclipse.microprofile.config.spi.Converter;

public class AwsStorageConverter implements Converter<Storage> {
@Override
public Storage convert(String s) {
if (s.equals("TEST")) {
if (s.equalsIgnoreCase(LaunchMode.TEST.name())) {
return new FixturedStorageService();
}
return new AwsS3StorageService();
Expand Down

0 comments on commit 7d4cdef

Please sign in to comment.