Package com.google.common.testing

Examples of com.google.common.testing.ClassSanityTester$SerializableDummyProxy


    assertTrue(Predicates.and(p1, p2).hashCode() != Predicates.or(p1, p2).hashCode());
  }

  @GwtIncompatible("reflection")
  public void testNulls() throws Exception {
    new ClassSanityTester().forAllPublicStaticMethods(Predicates.class).testNulls();
  }
View Full Code Here


    new ClassSanityTester().forAllPublicStaticMethods(Predicates.class).testNulls();
  }

  @GwtIncompatible("reflection")
  public void testEqualsAndSerializable() throws Exception {
    new ClassSanityTester().forAllPublicStaticMethods(Predicates.class).testEqualsAndSerializable();
  }
View Full Code Here

        new byte[] { (byte) 0xaa, (byte) 0xbb, (byte) 0x00 },
        dest));
  }

  private static ClassSanityTester.FactoryMethodReturnValueTester sanityTester() {
    return new ClassSanityTester()
        .setDefault(byte[].class, new byte[] {1, 2, 3, 4})
        .setDistinctValues(byte[].class, new byte[] {1, 2, 3, 4}, new byte[] {5, 6, 7, 8})
        .setDistinctValues(String.class, "7f8005ff0e", "7f8005ff0f")
        .forAllPublicStaticMethods(HashCode.class);
  }
View Full Code Here

    listenable.addListener(lateListener, directExecutor());
    assertTrue(lateListener.wasRun.await(1, SECONDS));
  }

  public void testAdapters_nullChecks() throws Exception {
    new ClassSanityTester()
        .forAllPublicStaticMethods(JdkFutureAdapters.class)
        .thatReturn(Future.class)
        .testNulls();
  }
View Full Code Here

    }
  }

  @GwtIncompatible("reflection")
  public void testEquals() throws Exception {
    new ClassSanityTester()
        .setDistinctValues(Class.class, Color.class, Gender.class)
        .setDistinctValues(Enum.class, Color.BLUE, Color.RED)
        .forAllPublicStaticMethods(EnumMultisetFactory.class)
        .testEquals();
  }
View Full Code Here

      }});
    assertEquals(oldName, Thread.currentThread().getName());
  }

  public void testExecutors_nullCheck() throws Exception {
    new ClassSanityTester()
        .setDefault(RateLimiter.class, RateLimiter.create(1.0))
        .forAllPublicStaticMethods(MoreExecutors.class)
        .thatReturn(Executor.class)
        .testNulls();
  }
View Full Code Here

      throw new RuntimeException("bad constructor");
    }
  }

  public void testFutures_nullChecks() throws Exception {
    new ClassSanityTester()
        .forAllPublicStaticMethods(Futures.class)
        .thatReturn(Future.class)
        .testNulls();
  }
View Full Code Here

    verifyMergeSorted(iterables, allIntegers);
  }

  @GwtIncompatible("reflection")
  public void testIterables_nullCheck() throws Exception {
    new ClassSanityTester()
        .forAllPublicStaticMethods(Iterables.class)
        .thatReturn(Iterable.class)
        .testNulls();
  }
View Full Code Here

TOP

Related Classes of com.google.common.testing.ClassSanityTester$SerializableDummyProxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.