Java 类com.google.common.util.concurrent.GeneratedMonitorTest.FlagGuard 实例源码

项目:guava-mock    文件:SupplementalMonitorTest.java   
public void testGetWaitQueueLengthWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.getWaitQueueLength(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException e) {
    // expected
  }
}
项目:guava-mock    文件:SupplementalMonitorTest.java   
public void testHasWaitersWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.hasWaiters(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException e) {
    // expected
  }
}
项目:guava-mock    文件:SupplementalMonitorTest.java   
public void testNullMonitorInGuardConstructorThrowsNPE() {
  try {
    new FlagGuard(null);
    fail("expected NullPointerException");
  } catch (NullPointerException e) {
    // expected
  }
}
项目:googles-monorepo-demo    文件:SupplementalMonitorTest.java   
public void testGetWaitQueueLengthWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.getWaitQueueLength(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException e) {
    // expected
  }
}
项目:googles-monorepo-demo    文件:SupplementalMonitorTest.java   
public void testHasWaitersWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.hasWaiters(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException e) {
    // expected
  }
}
项目:googles-monorepo-demo    文件:SupplementalMonitorTest.java   
public void testNullMonitorInGuardConstructorThrowsNPE() {
  try {
    new FlagGuard(null);
    fail("expected NullPointerException");
  } catch (NullPointerException e) {
    // expected
  }
}
项目:guava-libraries    文件:SupplementalMonitorTest.java   
public void testGetWaitQueueLengthWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.getWaitQueueLength(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException e) {
    // expected
  }
}
项目:guava-libraries    文件:SupplementalMonitorTest.java   
public void testHasWaitersWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.hasWaiters(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException e) {
    // expected
  }
}
项目:guava-libraries    文件:SupplementalMonitorTest.java   
public void testNullMonitorInGuardConstructorThrowsNPE() {
  try {
    new FlagGuard(null);
    fail("expected NullPointerException");
  } catch (NullPointerException e) {
    // expected
  }
}
项目:guava    文件:SupplementalMonitorTest.java   
public void testGetWaitQueueLengthWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.getWaitQueueLength(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException expected) {
  }
}
项目:guava    文件:SupplementalMonitorTest.java   
public void testHasWaitersWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.hasWaiters(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException expected) {
  }
}
项目:guava    文件:SupplementalMonitorTest.java   
public void testNullMonitorInGuardConstructorThrowsNPE() {
  try {
    new FlagGuard(null);
    fail("expected NullPointerException");
  } catch (NullPointerException expected) {
  }
}
项目:guava    文件:SupplementalMonitorTest.java   
public void testGetWaitQueueLengthWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.getWaitQueueLength(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException expected) {
  }
}
项目:guava    文件:SupplementalMonitorTest.java   
public void testHasWaitersWithWrongMonitorThrowsIMSE() {
  Monitor monitor1 = new Monitor();
  Monitor monitor2 = new Monitor();
  FlagGuard guard = new FlagGuard(monitor2);
  try {
    monitor1.hasWaiters(guard);
    fail("expected IllegalMonitorStateException");
  } catch (IllegalMonitorStateException expected) {
  }
}
项目:guava    文件:SupplementalMonitorTest.java   
public void testNullMonitorInGuardConstructorThrowsNPE() {
  try {
    new FlagGuard(null);
    fail("expected NullPointerException");
  } catch (NullPointerException expected) {
  }
}