Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "Rename MockFlagsRule" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhi Dou authored and Gerrit Code Review committed Aug 9, 2023
2 parents 0a48327 + d20064a commit 50f1ed2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import static org.junit.Assert.assertEquals;

import android.platform.test.flag.junit.MockFlagsRule;
import android.platform.test.flag.junit.SetFlagsRule;
import com.example.android.aconfig.demo.flags.Flags;

import org.junit.Rule;
Expand All @@ -28,12 +28,12 @@

@RunWith(JUnit4.class)
public final class StaticContentUnitTests {
@Rule public final MockFlagsRule mMockFlagsRule = new MockFlagsRule();
@Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();

@Test
public void staticContent_enable_staticFlag_disable_thirdFlag() throws Exception {
mMockFlagsRule.enableFlags(Flags.FLAG_APPEND_STATIC_CONTENT);
mMockFlagsRule.disableFlags(Flags.FLAG_THIRD_FLAG);
mSetFlagsRule.enableFlags(Flags.FLAG_APPEND_STATIC_CONTENT);
mSetFlagsRule.disableFlags(Flags.FLAG_THIRD_FLAG);
StaticContent statiContent = new StaticContent();
String ret = statiContent.getContent();
StringBuilder expected = new StringBuilder();
Expand Down

0 comments on commit 50f1ed2

Please sign in to comment.