1 // Copyright 2022 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.base.test.util; 6 7 import org.junit.Assert; 8 import org.junit.Test; 9 import org.junit.runner.RunWith; 10 import org.robolectric.annotation.Config; 11 12 import org.chromium.base.test.BaseRobolectricTestRunner; 13 14 /** Unit tests for the DisabledTest annotation in Robolectric tests. */ 15 @RunWith(BaseRobolectricTestRunner.class) 16 @Config(manifest = Config.NONE) 17 public class DisabledTestRobolectricTest { 18 @Test 19 @DisabledTest(message = "This test should be disabled") testDisabledTestAreNotExecuted()20 public void testDisabledTestAreNotExecuted() { 21 Assert.fail("Tests marked with @DisabledTest annotation should not be executed!"); 22 } 23 } 24