diff --git a/app/config/featureswitch/FeatureSwitch.scala b/app/config/featureswitch/FeatureSwitch.scala index 41ced537..6506f784 100644 --- a/app/config/featureswitch/FeatureSwitch.scala +++ b/app/config/featureswitch/FeatureSwitch.scala @@ -21,7 +21,7 @@ import testonly.controllers.featureswitch.FeatureSwitchSetting sealed trait FeatureSwitch { val name: String - val shortName: String + val displayName: String } object FeatureSwitch { @@ -36,13 +36,13 @@ object FeatureSwitch { } def apply(setting: FeatureSwitchSetting): FeatureSwitch = - switches find (_.shortName == setting.feature) match { + switches find (_.displayName == setting.feature) match { case Some(switch) => switch case None => throw new IllegalArgumentException("Invalid feature switch: " + setting.feature) } } object StubDESFeature extends FeatureSwitch { - val shortName = s"stub-des" - val name = s"$prefix.$shortName" + val displayName = s"Use stub for DES connection" + val name = s"$prefix.stub-des" } diff --git a/app/testonly/controllers/featureswitch/FeatureSwitchSetting.scala b/app/testonly/controllers/featureswitch/FeatureSwitchSetting.scala index a9cfab21..d905d1b9 100644 --- a/app/testonly/controllers/featureswitch/FeatureSwitchSetting.scala +++ b/app/testonly/controllers/featureswitch/FeatureSwitchSetting.scala @@ -27,6 +27,6 @@ object FeatureSwitchSetting { implicit val format: OFormat[FeatureSwitchSetting] = Json.format[FeatureSwitchSetting] def apply(featureSwitch: FeatureSwitch, enable: Boolean): FeatureSwitchSetting = - FeatureSwitchSetting(featureSwitch.shortName, enable) + FeatureSwitchSetting(featureSwitch.displayName, enable) }