Add setFlag and resetAll in FeatureFlags test mode

Add methods setFlag and resetAll in FeatureFlags in test mode. For the
injection usecase, user will use the interface FeatureFlags in the code
to control the flags.

Add tests for test mode.

Bug: 280833463
Test: Atest AconfigJavaHostTest --host
Change-Id: Ib59ba35a9011a6400af42fc9c283d37193577997
This commit is contained in:
Zhi Dou
2023-08-07 18:09:28 +00:00
parent 5aaeee3749
commit a7200115c5
7 changed files with 161 additions and 5 deletions

View File

@@ -29,5 +29,16 @@ public final class FeatureFlagsImpl implements FeatureFlags \{
"Method is not implemented.");
}
{{ endfor- }}
@Override
public void setFlag(String flagName, boolean value) \{
throw new UnsupportedOperationException(
"Method is not implemented.");
}
@Override
public void resetAll() \{
throw new UnsupportedOperationException(
"Method is not implemented.");
}
}
{{ endif }}