@Override public SELF isNotSameAs(Object other) { return super.isNotSameAs(other); }
@Override public SELF isNotSameAs(Object other) { return super.isNotSameAs(other); }
@Test public void testProvidesDifferentObjects() { assertThat(myService1).isNotSameAs(myService2); } }
@Test public void shouldBeNotTheSameRetry() { AsyncRetry retry = retryRegistry.retry("testName"); AsyncRetry retry2 = retryRegistry.retry("otherTestName"); Assertions.assertThat(retry).isNotSameAs(retry2); Assertions.assertThat(retryRegistry.getAllRetries()).hasSize(2); }
@Test public void shouldBeNotTheSameRetry() { Retry retry = retryRegistry.retry("testName"); Retry retry2 = retryRegistry.retry("otherTestName"); Assertions.assertThat(retry).isNotSameAs(retry2); Assertions.assertThat(retryRegistry.getAllRetries()).hasSize(2); }
@Test public void testUploadAndFetchExecutionFlows() throws Exception { final ExecutableFlow flow = createTestFlow(); this.executionFlowDao.uploadExecutableFlow(flow); final ExecutableFlow fetchFlow = this.executionFlowDao.fetchExecutableFlow(flow.getExecutionId()); assertThat(flow).isNotSameAs(fetchFlow); assertTwoFlowSame(flow, fetchFlow); }
@Test public void testPreallocateContent() { assertThat(acquireMountContent(mContext1, mLifecycle)).isSameAs(mNewMountContent); maybePreallocateContent(mContext1, mLifecycle); // Change the content that's returned when we create new mount content to make sure we're // getting the one from preallocating above. mNewMountContent = new View(mContext1); assertThat(acquireMountContent(mContext1, mLifecycle)).isNotSameAs(mNewMountContent); }
@Test public void shouldBeNotTheSameInstance() { Bulkhead bulkhead1 = registry.bulkhead("test1"); Bulkhead bulkhead2 = registry.bulkhead("test2"); assertThat(bulkhead1).isNotSameAs(bulkhead2); assertThat(registry.getAllBulkheads()).hasSize(2); }
@Test public void shouldBeNotTheSameCircuitBreaker() { CircuitBreaker circuitBreaker = circuitBreakerRegistry.circuitBreaker("testName"); CircuitBreaker circuitBreaker2 = circuitBreakerRegistry.circuitBreaker("otherTestName"); assertThat(circuitBreaker).isNotSameAs(circuitBreaker2); assertThat(circuitBreakerRegistry.getAllCircuitBreakers()).hasSize(2); } }
@Override public void call(final TiView tiView) { // Then the work gets executed on the ui thread final Thread currentThread = Thread.currentThread(); assertThat(testThread).isNotSameAs(currentThread); assertThat("test ui thread") .as("executed on wrong thread") .isEqualTo(currentThread.getName()); latch.countDown(); } });
@Override public void run() { // Then the work gets executed on the correct thread final Thread currentThread = Thread.currentThread(); assertThat(testThread).isNotSameAs(currentThread); assertThat("test ui thread") .as("executed on wrong thread") .isEqualTo(currentThread.getName()); latch.countDown(); } });
@Test public void shouldCreateNewCopyWithUpdatedPoisonStatusForStaticInitializerMarking() { final MutationDetails testee = MutationDetailsMother.aMutationDetail().build(); final MutationDetails actual = testee.withPoisonStatus(PoisonStatus.IS_STATIC_INITIALIZER_CODE); assertThat(actual).isNotSameAs(testee); assertThat(actual.mayPoisonJVM()).isTrue(); assertThat(actual.isInStaticInitializer()).isTrue(); }
@Test public void testLoggingDisabled_wrap() throws Exception { final LoggingInterceptor interceptor = new LoggingInterceptor(); final TiView view = mock(TiView.class); final TiView interceptView = interceptor.intercept(view); assertThat(interceptView).isNotEqualTo(view).isNotSameAs(view); }
@Test public void shouldCreateNewCopyWithUpdatedPoisonStatusForJVMPoisoningMarking() { final MutationDetails testee = MutationDetailsMother.aMutationDetail().build(); final MutationDetails actual = testee.withPoisonStatus(PoisonStatus.MAY_POISON_JVM); assertThat(actual).isNotSameAs(testee); assertThat(actual.mayPoisonJVM()).isTrue(); }
assertThat(arg1).isNotSameAs(arg2); assertThat(arg1.hashCode()).isEqualTo(arg2.hashCode());
assertThat(presenter2).isNotSameAs(presenter1);
@Test public void shouldResolveUnresolvedAddress() { InetSocketAddress socketAddress = InetSocketAddress.createUnresolved("google.com", 80); InetSocketAddress processedAddress = InetSocketAddressUtil .replaceWithResolved(socketAddress); assertThat(processedAddress).isNotSameAs(socketAddress); assertThat(processedAddress.isUnresolved()).isFalse(); }
@Test public void gettingOptionsDuplicates() { TcpClient client = TcpClient.create().host("foo").port(123); Assertions.assertThat(client.configure()) .isNotSameAs(TcpClient.DEFAULT_BOOTSTRAP) .isNotSameAs(client.configure()); }
@Test public void gettingOptionsDuplicates() { HttpServer server = HttpServer.create() .port(123) .host(("foo")) .compress(true); assertThat(server.tcpConfiguration().configure()) .isNotSameAs(HttpServer.DEFAULT_TCP_SERVER) .isNotSameAs(server.tcpConfiguration().configure()); }
@Test public void gettingOptionsDuplicates() { HttpClient client = HttpClient.create() .tcpConfiguration(tcpClient -> tcpClient.host("foo")) .wiretap(true) .port(123) .compress(true); assertThat(client.tcpConfiguration()) .isNotSameAs(HttpClient.DEFAULT_TCP_CLIENT) .isNotSameAs(client.tcpConfiguration()); }