Class SplitClientForTest

  • All Implemented Interfaces:
    io.split.client.SplitClient

    public class SplitClientForTest
    extends Object
    implements io.split.client.SplitClient
    • Constructor Detail

      • SplitClientForTest

        public SplitClientForTest()
    • Method Detail

      • clearTreatments

        public void clearTreatments()
      • registerTreatments

        public void registerTreatments​(Map<String,​String> treatments)
      • registerTreatment

        public void registerTreatment​(String feature,
                                      String treatment)
      • getTreatment

        public String getTreatment​(String key,
                                   String featureFlagName)
        Specified by:
        getTreatment in interface io.split.client.SplitClient
      • getTreatment

        public String getTreatment​(String key,
                                   String featureFlagName,
                                   Map<String,​Object> attributes)
        Specified by:
        getTreatment in interface io.split.client.SplitClient
      • getTreatment

        public String getTreatment​(io.split.client.api.Key key,
                                   String featureFlagName,
                                   Map<String,​Object> attributes)
        Specified by:
        getTreatment in interface io.split.client.SplitClient
      • getTreatmentWithConfig

        public io.split.client.api.SplitResult getTreatmentWithConfig​(String key,
                                                                      String featureFlagName)
        Specified by:
        getTreatmentWithConfig in interface io.split.client.SplitClient
      • getTreatmentWithConfig

        public io.split.client.api.SplitResult getTreatmentWithConfig​(String key,
                                                                      String featureFlagName,
                                                                      Map<String,​Object> attributes)
        Specified by:
        getTreatmentWithConfig in interface io.split.client.SplitClient
      • getTreatmentWithConfig

        public io.split.client.api.SplitResult getTreatmentWithConfig​(io.split.client.api.Key key,
                                                                      String featureFlagName,
                                                                      Map<String,​Object> attributes)
        Specified by:
        getTreatmentWithConfig in interface io.split.client.SplitClient
      • getTreatments

        public Map<String,​String> getTreatments​(String key,
                                                      List<String> featureFlagNames)
        Specified by:
        getTreatments in interface io.split.client.SplitClient
      • getTreatments

        public Map<String,​String> getTreatments​(io.split.client.api.Key key,
                                                      List<String> featureFlagNames,
                                                      Map<String,​Object> attributes)
        Specified by:
        getTreatments in interface io.split.client.SplitClient
      • getTreatmentsWithConfig

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfig​(String key,
                                                                                         List<String> featureFlagNames)
        Specified by:
        getTreatmentsWithConfig in interface io.split.client.SplitClient
      • getTreatmentsWithConfig

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfig​(String key,
                                                                                         List<String> featureFlagNames,
                                                                                         Map<String,​Object> attributes)
        Specified by:
        getTreatmentsWithConfig in interface io.split.client.SplitClient
      • getTreatmentsWithConfig

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfig​(io.split.client.api.Key key,
                                                                                         List<String> featureFlagNames,
                                                                                         Map<String,​Object> attributes)
        Specified by:
        getTreatmentsWithConfig in interface io.split.client.SplitClient
      • getTreatmentsByFlagSet

        public Map<String,​String> getTreatmentsByFlagSet​(String key,
                                                               String flagSet)
        Specified by:
        getTreatmentsByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsByFlagSet

        public Map<String,​String> getTreatmentsByFlagSet​(String key,
                                                               String flagSet,
                                                               Map<String,​Object> attributes)
        Specified by:
        getTreatmentsByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsByFlagSet

        public Map<String,​String> getTreatmentsByFlagSet​(io.split.client.api.Key key,
                                                               String flagSet,
                                                               Map<String,​Object> attributes)
        Specified by:
        getTreatmentsByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsByFlagSets

        public Map<String,​String> getTreatmentsByFlagSets​(String key,
                                                                List<String> flagSets)
        Specified by:
        getTreatmentsByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsByFlagSets

        public Map<String,​String> getTreatmentsByFlagSets​(String key,
                                                                List<String> flagSets,
                                                                Map<String,​Object> attributes)
        Specified by:
        getTreatmentsByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsByFlagSets

        public Map<String,​String> getTreatmentsByFlagSets​(io.split.client.api.Key key,
                                                                List<String> flagSets,
                                                                Map<String,​Object> attributes)
        Specified by:
        getTreatmentsByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSet

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSet​(String key,
                                                                                                  String flagSet)
        Specified by:
        getTreatmentsWithConfigByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSet

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSet​(String key,
                                                                                                  String flagSet,
                                                                                                  Map<String,​Object> attributes)
        Specified by:
        getTreatmentsWithConfigByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSet

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSet​(io.split.client.api.Key key,
                                                                                                  String flagSet,
                                                                                                  Map<String,​Object> attributes)
        Specified by:
        getTreatmentsWithConfigByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSets

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSets​(String key,
                                                                                                   List<String> flagSets)
        Specified by:
        getTreatmentsWithConfigByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSets

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSets​(String key,
                                                                                                   List<String> flagSets,
                                                                                                   Map<String,​Object> attributes)
        Specified by:
        getTreatmentsWithConfigByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSets

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSets​(io.split.client.api.Key key,
                                                                                                   List<String> flagSets,
                                                                                                   Map<String,​Object> attributes)
        Specified by:
        getTreatmentsWithConfigByFlagSets in interface io.split.client.SplitClient
      • getTreatment

        public String getTreatment​(String key,
                                   String featureFlagName,
                                   io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatment in interface io.split.client.SplitClient
      • getTreatment

        public String getTreatment​(String key,
                                   String featureFlagName,
                                   Map<String,​Object> attributes,
                                   io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatment in interface io.split.client.SplitClient
      • getTreatment

        public String getTreatment​(io.split.client.api.Key key,
                                   String featureFlagName,
                                   Map<String,​Object> attributes,
                                   io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatment in interface io.split.client.SplitClient
      • getTreatments

        public Map<String,​String> getTreatments​(String key,
                                                      List<String> featureFlagNames,
                                                      io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatments in interface io.split.client.SplitClient
      • getTreatments

        public Map<String,​String> getTreatments​(String key,
                                                      List<String> featureFlagNames,
                                                      Map<String,​Object> attributes,
                                                      io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatments in interface io.split.client.SplitClient
      • getTreatments

        public Map<String,​String> getTreatments​(io.split.client.api.Key key,
                                                      List<String> featureFlagNames,
                                                      Map<String,​Object> attributes,
                                                      io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatments in interface io.split.client.SplitClient
      • getTreatmentWithConfig

        public io.split.client.api.SplitResult getTreatmentWithConfig​(String key,
                                                                      String featureFlagName,
                                                                      io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentWithConfig in interface io.split.client.SplitClient
      • getTreatmentWithConfig

        public io.split.client.api.SplitResult getTreatmentWithConfig​(io.split.client.api.Key key,
                                                                      String featureFlagName,
                                                                      Map<String,​Object> attributes,
                                                                      io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentWithConfig in interface io.split.client.SplitClient
      • getTreatmentWithConfig

        public io.split.client.api.SplitResult getTreatmentWithConfig​(String key,
                                                                      String featureFlagName,
                                                                      Map<String,​Object> attributes,
                                                                      io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentWithConfig in interface io.split.client.SplitClient
      • getTreatmentsWithConfig

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfig​(String key,
                                                                                         List<String> featureFlagNames,
                                                                                         Map<String,​Object> attributes,
                                                                                         io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfig in interface io.split.client.SplitClient
      • getTreatmentsWithConfig

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfig​(String key,
                                                                                         List<String> featureFlagNames,
                                                                                         io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfig in interface io.split.client.SplitClient
      • getTreatmentsByFlagSet

        public Map<String,​String> getTreatmentsByFlagSet​(String key,
                                                               String flagSet,
                                                               Map<String,​Object> attributes,
                                                               io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsByFlagSets

        public Map<String,​String> getTreatmentsByFlagSets​(String key,
                                                                List<String> flagSets,
                                                                io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsByFlagSets

        public Map<String,​String> getTreatmentsByFlagSets​(String key,
                                                                List<String> flagSets,
                                                                Map<String,​Object> attributes,
                                                                io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSet

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSet​(String key,
                                                                                                  String flagSet,
                                                                                                  io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfigByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSet

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSet​(String key,
                                                                                                  String flagSet,
                                                                                                  Map<String,​Object> attributes,
                                                                                                  io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfigByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSets

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSets​(String key,
                                                                                                   List<String> flagSets,
                                                                                                   io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfigByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSets

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSets​(String key,
                                                                                                   List<String> flagSets,
                                                                                                   Map<String,​Object> attributes,
                                                                                                   io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfigByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsByFlagSet

        public Map<String,​String> getTreatmentsByFlagSet​(String key,
                                                               String flagSet,
                                                               io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsWithConfig

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfig​(io.split.client.api.Key key,
                                                                                         List<String> featureFlagNames,
                                                                                         Map<String,​Object> attributes,
                                                                                         io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfig in interface io.split.client.SplitClient
      • getTreatmentsByFlagSet

        public Map<String,​String> getTreatmentsByFlagSet​(io.split.client.api.Key key,
                                                               String flagSet,
                                                               Map<String,​Object> attributes,
                                                               io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsByFlagSets

        public Map<String,​String> getTreatmentsByFlagSets​(io.split.client.api.Key key,
                                                                List<String> flagSets,
                                                                Map<String,​Object> attributes,
                                                                io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsByFlagSets in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSet

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSet​(io.split.client.api.Key key,
                                                                                                  String flagSet,
                                                                                                  Map<String,​Object> attributes,
                                                                                                  io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfigByFlagSet in interface io.split.client.SplitClient
      • getTreatmentsWithConfigByFlagSets

        public Map<String,​io.split.client.api.SplitResult> getTreatmentsWithConfigByFlagSets​(io.split.client.api.Key key,
                                                                                                   List<String> flagSets,
                                                                                                   Map<String,​Object> attributes,
                                                                                                   io.split.client.dtos.EvaluationOptions evaluationOptions)
        Specified by:
        getTreatmentsWithConfigByFlagSets in interface io.split.client.SplitClient
      • destroy

        public void destroy()
        Specified by:
        destroy in interface io.split.client.SplitClient
      • track

        public boolean track​(String key,
                             String trafficType,
                             String eventType)
        Specified by:
        track in interface io.split.client.SplitClient
      • track

        public boolean track​(String key,
                             String trafficType,
                             String eventType,
                             double value)
        Specified by:
        track in interface io.split.client.SplitClient
      • track

        public boolean track​(String key,
                             String trafficType,
                             String eventType,
                             Map<String,​Object> properties)
        Specified by:
        track in interface io.split.client.SplitClient
      • track

        public boolean track​(String key,
                             String trafficType,
                             String eventType,
                             double value,
                             Map<String,​Object> properties)
        Specified by:
        track in interface io.split.client.SplitClient