當前位置: 首頁>>代碼示例>>Java>>正文


Java Disabled類代碼示例

本文整理匯總了Java中org.junit.jupiter.api.Disabled的典型用法代碼示例。如果您正苦於以下問題:Java Disabled類的具體用法?Java Disabled怎麽用?Java Disabled使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Disabled類屬於org.junit.jupiter.api包,在下文中一共展示了Disabled類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: shouldProcessDynamicTestLabels

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled("not implemented")
void shouldProcessDynamicTestLabels() {
    runClasses(DynamicTests.class);
    final List<TestResult> testResults = results.getTestResults();
    assertThat(testResults)
            .hasSize(3)
            .flatExtracting(TestResult::getLabels)
            .extracting(Label::getValue)
            .contains(
                    "epic1", "epic2", "epic3",
                    "feature1", "feature2", "feature3",
                    "story1", "story2", "story3",
                    "some-owner"
            );
}
 
開發者ID:allure-framework,項目名稱:allure-java,代碼行數:17,代碼來源:AnnotationsTest.java

示例2: testGetJobs

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Disabled
	@Test
	public void testGetJobs() throws Exception {
		Set<String> jobNames = new HashSet<>();
		jobNames.add("job1");
		jobNames.add("job2");
		jobNames.add("job3");

		Long job1Id = 1L;
		Long job2Id = 2L;
		List<Long> jobExecutions = new ArrayList<>();
		jobExecutions.add(job1Id);

		JobInstance jobInstance = new JobInstance(job1Id, "job1");

		expect(jobOperator.getJobNames()).andReturn(jobNames).anyTimes();
		expect(jobOperator.getJobInstances(eq("job1"), eq(0), eq(1))).andReturn(jobExecutions);
		expect(jobExplorer.getJobInstance(eq(job1Id))).andReturn(jobInstance);
//		expect(jobOperator.getJobInstances(eq("job2"), eq(0), eq(1))).andReturn(null);
		replayAll();
		assertThat(service.getJobs(), nullValue());
	}
 
開發者ID:namics,項目名稱:spring-batch-support,代碼行數:23,代碼來源:JobServiceImplTest.java

示例3: testCycleReference

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Disabled
@Test
void testCycleReference() {
    final SimpleModule module = module();
    module.accept(service().forClass(A.class).forConstructor().withParameters(B.class, C.class).build());
    module.accept(service()
            .forClass(B.class).forConstructor()
            .postConstruct().method().withName("setA").withParameters(A.class).build());
    module.accept(service()
            .forClass(C.class).forConstructor()
            .postConstruct().method().withName("setB").withParameters(B.class).build());

    final A actual = module.locate(A.class).get();

    assertThat(actual).isNotNull();
    assertThat(actual.getB()).isNotNull();
    assertThat(actual.getB().getA()).isNotNull();
    assertThat(actual.getC()).isNotNull();
    assertThat(actual.getC().getB()).isNotNull();
}
 
開發者ID:slezhnin,項目名稱:yadi,代碼行數:21,代碼來源:SimpleModuleTest.java

示例4: testMethodReflectorFactoryClassName

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled("Unsupported")
public void testMethodReflectorFactoryClassName() {
    String EXPECTED = "eu.mikroskeem.shuriken.instrumentation.methodreflector." +
            "Target$TestClass3$MethodReflectorTester$DummyInterface2$0";

    TestClass3 tc = new TestClass3();
    ClassWrapper<TestClass3> tcWrap = wrapInstance(tc);

    String MRF_CLASS = "eu.mikroskeem.shuriken.instrumentation.methodreflector.MethodReflectorFactory";
    ClassWrapper<?> mrfClass = Reflect.getClass(MRF_CLASS).get();
    ClassWrapper<?> mrf = wrapInstance(wrapClass(MethodReflector.class).getField("factory", mrfClass).get().read());

    String className = mrf.invokeMethod("generateName",
            String.class,
            TypeWrapper.of(tcWrap),
            TypeWrapper.of(DummyInterface2.class));
    Assertions.assertEquals(EXPECTED, className, "Class names should equal");
}
 
開發者ID:mikroskeem,項目名稱:Shuriken,代碼行數:20,代碼來源:MethodReflectorTester.java

示例5: shouldEventuallyCleanUpExpiredKeys

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled
void shouldEventuallyCleanUpExpiredKeys() throws Exception {
    ImmutableSet<RequestLimitRule> rules = ImmutableSet.of(RequestLimitRule.of(1, TimeUnit.SECONDS, 5));
    RequestRateLimiter requestRateLimiter = getRateLimiter(rules, timeBandit);

    String key = "ip:127.0.0.5";

    IntStream.rangeClosed(1, 5).forEach(value -> {
        timeBandit.addUnixTimeMilliSeconds(100L);
        assertThat(requestRateLimiter.overLimitWhenIncremented(key)).isFalse();
    });

    while (expiryingKeyMap.size() != 0) {
        Thread.sleep(50);
    }

    assertThat(expiryingKeyMap.size()).isZero();
}
 
開發者ID:mokies,項目名稱:ratelimitj,代碼行數:20,代碼來源:InMemoryRequestRateLimiterInternalTest.java

示例6: firstFlow

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled
@DisplayName("Create tasks concurrently and retrieve projection")
void firstFlow() throws InterruptedException {
    final TodoClient[] clients = getClients();
    final int numberOfRequests = 100;
    asyncPerformanceTest(iterationNumber -> {
        final CreateBasicTask basicTask = createBasicTask();
        clients[iterationNumber % clients.length].postCommand(basicTask);
    }, numberOfRequests);

    final List<TaskItem> taskItems = getClient().getMyListView()
                                                .getMyList()
                                                .getItemsList();

    final int expected = numberOfRequests;
    assertEquals(expected, taskItems.size());
}
 
開發者ID:SpineEventEngine,項目名稱:todo-list,代碼行數:19,代碼來源:ToDoListTest.java

示例7: canLogout

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Disabled
@Test
public void canLogout() {
  HttpResponse response = post("logout", null);

  assertThat(response.getStatusCode(), is(HttpResponseStatus.FORBIDDEN.code()));
  assertThat(response.getStatusMessage(), is(HttpResponseStatus.UNAUTHORIZED.reasonPhrase()));
}
 
開發者ID:glytching,項目名稱:dragoman,代碼行數:9,代碼來源:AuthenticationResourceTest.java

示例8: testCumulativeCounters

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Disabled("CI is failing often asserting that the count is 23")
@Test
void testCumulativeCounters() throws Exception {
    HystrixCommandKey key = HystrixCommandKey.Factory.asKey("MicrometerCOMMAND-A");
    HystrixCommandProperties properties = new HystrixPropertiesCommandDefault(key, propertiesSetter);
    HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(key, groupKey, properties);
    HystrixCircuitBreaker circuitBreaker = HystrixCircuitBreaker.Factory.getInstance(key, groupKey, properties, metrics);

    SimpleMeterRegistry registry = new SimpleMeterRegistry();

    MicrometerMetricsPublisherCommand metricsPublisherCommand = new MicrometerMetricsPublisherCommand(registry, key, groupKey, metrics, circuitBreaker, properties);
    metricsPublisherCommand.initialize();

    for (int i = 0; i < 3; i++) {
        new SuccessCommand(key).execute();
        new SuccessCommand(key).execute();
        new SuccessCommand(key).execute();
        Thread.sleep(10);
        new TimeoutCommand(key).execute();
        new SuccessCommand(key).execute();
        new FailureCommand(key).execute();
        new FailureCommand(key).execute();
        new SuccessCommand(key).execute();
        new SuccessCommand(key).execute();
        new SuccessCommand(key).execute();
        Thread.sleep(10);
        new SuccessCommand(key).execute();
    }

    List<Tag> tags = Tags.zip("group", "MicrometerGROUP", "key", "MicrometerCOMMAND-A");

    assertExecutionMetric(registry, "success", 24.0);
    assertThat(registry.mustFind("hystrix.execution").tags(tags).tags("event", "timeout").functionCounter().count()).isEqualTo(3.0);
    assertThat(registry.mustFind("hystrix.execution").tags(tags).tags("event", "failure").functionCounter().count()).isEqualTo(6.0);
    assertThat(registry.mustFind("hystrix.execution").tags(tags).tags("event", "short_circuited").functionCounter().count()).isEqualTo(0.0);
    assertThat(registry.mustFind("hystrix.circuit.breaker.open").tags(tags).gauge().value()).isEqualTo(0.0);
}
 
開發者ID:micrometer-metrics,項目名稱:micrometer,代碼行數:38,代碼來源:MicrometerMetricsPublisherCommandTest.java

示例9: testOpenCircuit

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Disabled
@Test
void testOpenCircuit() throws Exception {
    HystrixCommandKey key = HystrixCommandKey.Factory.asKey("MicrometerCOMMAND-B");
    HystrixCommandProperties properties = new HystrixPropertiesCommandDefault(key, propertiesSetter.withCircuitBreakerForceOpen(true));
    HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(key, groupKey, properties);
    HystrixCircuitBreaker circuitBreaker = HystrixCircuitBreaker.Factory.getInstance(key, groupKey, properties, metrics);
    SimpleMeterRegistry registry = new SimpleMeterRegistry();
    MicrometerMetricsPublisherCommand metricsPublisherCommand = new MicrometerMetricsPublisherCommand(registry, key, groupKey, metrics, circuitBreaker, properties);
    metricsPublisherCommand.initialize();

    new SuccessCommand(key).execute();
    new SuccessCommand(key).execute();
    new TimeoutCommand(key).execute();
    new FailureCommand(key).execute();
    new FailureCommand(key).execute();
    new SuccessCommand(key).execute();

    List<Tag> tags = Tags.zip("group", groupKey.name(), "key", key.name());

    assertExecutionMetric(registry, "short_circuited", 6.0);
    assertThat(registry.mustFind("hystrix.execution").tags(tags).tags("event", "success").functionCounter().count()).isEqualTo(0.0);
    assertThat(registry.mustFind("hystrix.execution").tags(tags).tags("event", "timeout").functionCounter().count()).isEqualTo(0.0);
    assertThat(registry.mustFind("hystrix.execution").tags(tags).tags("event", "failure").functionCounter().count()).isEqualTo(0.0);
    assertThat(registry.mustFind("hystrix.fallback").tags(tags).tags("event", "fallback_success").functionCounter().count()).isEqualTo(6.0);
    assertThat(registry.mustFind("hystrix.circuit.breaker.open").tags(tags).gauge().value()).isEqualTo(1.0);
}
 
開發者ID:micrometer-metrics,項目名稱:micrometer,代碼行數:28,代碼來源:MicrometerMetricsPublisherCommandTest.java

示例10: testNamedAnnotations

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled("javax.inject.Named isn't supported yet")
public void testNamedAnnotations() throws Exception {
    /*
    Injector injector = ShurikenInjector.createInjector(binder -> {
        binder.bind(Object.class)
                .annotatedWith(Named.as("name one"))
                .toInstance("foo");
        binder.bind(String.class)
                .annotatedWith(Named.as("name two"))
                .toInstance("bar");
    });
    */
}
 
開發者ID:mikroskeem,項目名稱:Shuriken,代碼行數:15,代碼來源:InjectorTester.java

示例11: getConnection

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Disabled("We first have to find/build some tool to help test these connections.")
@Test
@Tag("fast")
void getConnection() throws PlcException {
    S7PlcConnection s7Connection = (S7PlcConnection)
        new PlcDriverManager().getConnection("s7://localhost/1/2");
    Assertions.assertEquals(s7Connection.getHostName(), "localhost");
    Assertions.assertEquals(s7Connection.getRack(), 1);
    Assertions.assertEquals(s7Connection.getSlot(), 2);
}
 
開發者ID:apache,項目名稱:incubator-plc4x,代碼行數:11,代碼來源:S7PlcDriverTest.java

示例12: testEncodeRecode

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled("Adapters will be moved")
public void testEncodeRecode() throws IOException {
  final Path file = Files.createTempFile("testEncodeRecode", "frc");
  final Recording recording = new Recording();
  recording.append(new TimestampedData("foo", DataTypes.All, 0.0, 0));
  recording.append(new TimestampedData("foo", DataTypes.All, 100.0, 1));
  Serialization.saveRecording(recording, file);
  final Recording loaded = Serialization.loadRecording(file);
  assertEquals(recording, loaded, "The loaded recording differs from the encoded one");
}
 
開發者ID:wpilibsuite,項目名稱:shuffleboard,代碼行數:12,代碼來源:SerializationTest.java

示例13: testChangeTrueColor

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled
public void testChangeTrueColor() {
  final Color color = Color.WHITE;
  widget.getSource().setData(true);
  widget.setTrueColor(color);
  WaitForAsyncUtils.waitForFxEvents();
  assertEquals(color, getBackground(), "Background was the wrong color");
}
 
開發者ID:wpilibsuite,項目名稱:shuffleboard,代碼行數:10,代碼來源:BooleanBoxWidgetTest.java

示例14: testChangeFalseColor

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled
public void testChangeFalseColor() {
  widget.getSource().setData(false);
  widget.setFalseColor(Color.BLACK);
  WaitForAsyncUtils.waitForFxEvents();
  assertEquals(widget.getFalseColor(), getBackground(), "Background was the wrong color");
}
 
開發者ID:wpilibsuite,項目名稱:shuffleboard,代碼行數:9,代碼來源:BooleanBoxWidgetTest.java

示例15: testValueUpdates

import org.junit.jupiter.api.Disabled; //導入依賴的package包/類
@Test
@Disabled("Race conditions in dependencies")
public void testValueUpdates() throws TimeoutException {
  String key = "key";
  DataType type = DataTypes.All;
  SingleKeyNetworkTableSource<String> source
      = new SingleKeyNetworkTableSource<>(table, key, type);
  table.getEntry(key).setString("a value");
  NetworkTableInstance.getDefault().waitForEntryListenerQueue(-1.0);
  assertEquals("a value", source.getData());
  assertTrue(source.isActive(), "The source should be active");
  source.close();
}
 
開發者ID:wpilibsuite,項目名稱:shuffleboard,代碼行數:14,代碼來源:SingleKeyNetworkTableSourceTest.java


注:本文中的org.junit.jupiter.api.Disabled類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。