io.sniffy
Code IndexAdd Codota to your IDE (free)

Best code snippets using io.sniffy(Showing top 15 results out of 315)

origin: sniffy/sniffy

@Test
public void testAtMostMergePositive() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatement(Query.MERGE);
  spy.verifyAtMost(2, Query.MERGE);
  spy = Sniffy.spy();
  executeStatement(Query.DELETE);
  executeStatements(2, Query.MERGE);
  spy.verifyAtMost(2, Query.MERGE);
}
origin: sniffy/sniffy

@Test
public void testAtLeastDeletePositive() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatements(3, Query.DELETE);
  spy.verifyAtLeast(2, Query.DELETE);
}
origin: sniffy/sniffy

@Test(expected = WrongNumberOfQueriesError.class)
public void testBetweenOtherOtherThreadNegative() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementInOtherThread(Query.OTHER);
  executeStatements(2, Query.OTHER);
  spy.verifyBetween(2, 4, Query.OTHER, Threads.OTHERS);
}
origin: sniffy/sniffy

@Test
public void testAtMostOnceUpdateOtherThreadPositive() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementInOtherThread(Query.SELECT);
  executeStatementInOtherThread(Query.UPDATE);
  executeStatements(5, Query.UPDATE);
  spy.verifyAtMostOnce(Threads.OTHERS, Query.UPDATE);
}
origin: sniffy/sniffy

@Test(expected = WrongNumberOfQueriesError.class)
public void testAtMostMergeOtherThreadNegative() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementsInOtherThread(3, Query.MERGE);
  spy.verifyAtMost(2, Query.MERGE, Threads.OTHERS);
}
origin: sniffy/sniffy

@Test(expected = WrongNumberOfQueriesError.class)
public void testAtLeastDeleteNegative() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatement(Query.DELETE);
  executeStatement(Query.OTHER);
  spy.verifyAtLeast(2, Query.DELETE);
}
origin: sniffy/sniffy

@Test
public void testAtMostOnceUpdatePositive() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatement(Query.UPDATE);
  spy.verifyAtMostOnce(Query.UPDATE);
  spy = Sniffy.spy();
  executeStatement(Query.DELETE);
  executeStatement(Query.UPDATE);
  spy.verifyAtMostOnce(Query.UPDATE);
}
origin: sniffy/sniffy

@Test
public void testNeverInsertPositive() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatement(Query.SELECT);
  spy.verifyNever(Query.INSERT);
}
origin: sniffy/sniffy

@Test
public void testAtMostMergeOtherThreadPositive() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementInOtherThread(Query.SELECT);
  executeStatementInOtherThread(Query.MERGE);
  executeStatements(5, Query.MERGE);
  spy.verifyAtMost(2, Threads.OTHERS, Query.MERGE);
}
origin: sniffy/sniffy

@Test
public void testNeverInsertOtherThreadPositive() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementInOtherThread(Query.SELECT);
  executeStatement(Query.INSERT);
  spy.verifyNever(Threads.OTHERS, Query.INSERT);
}
origin: sniffy/sniffy

@Test(expected = WrongNumberOfQueriesError.class)
public void testNeverInsertOtherThreadNegative() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementInOtherThread(Query.INSERT);
  spy.verifyNever(Query.INSERT, Threads.OTHERS);
}
origin: sniffy/sniffy

@Test(expected = WrongNumberOfQueriesError.class)
public void testAtMostOnceUpdateOtherThreadNegative() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementsInOtherThread(2, Query.UPDATE);
  spy.verifyAtMostOnce(Query.UPDATE, Threads.OTHERS);
}
origin: sniffy/sniffy

@Test(expected = WrongNumberOfQueriesError.class)
public void testAtMostOnceUpdateNegative() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatements(2, Query.UPDATE);
  spy.verifyAtMostOnce(Query.UPDATE);
}
origin: sniffy/sniffy

@Test(expected = WrongNumberOfQueriesError.class)
public void testAtLeastDeleteOtherThreadNegative() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementInOtherThread(Query.DELETE);
  executeStatement(Query.DELETE);
  spy.verifyAtLeast(2, Query.DELETE, Threads.OTHERS);
}
origin: sniffy/sniffy

@Test
public void testAtLeastDeleteOtherThreadPositive() throws Exception {
  Spy spy = Sniffy.spy();
  executeStatementsInOtherThread(2, Query.DELETE);
  spy.verifyAtLeast(2, Threads.OTHERS, Query.DELETE);
}
io.sniffy

Most used classes

  • Sniffy
    Sniffy allows you to validate the number of SQL queries executed by a given block of code Example us
  • ConnectionsRegistry
  • Spy
    Spy holds a number of queries which were executed at some point of time and uses it as a base for fu
  • ExceptionUtil
  • SocketExpectation
  • SqlExpectation,
  • SqlQueries$SqlExpectation,
  • AnnotationProcessor,
  • Range,
  • CurrentThreadSpy,
  • SniffyAssertionError,
  • SniffyConfiguration,
  • SniffyDataSource,
  • StringUtil,
  • LegacySpy,
  • NoQueriesAllowed,
  • Sniffer,
  • Spy$SpyClosedException,
  • WrongNumberOfQueriesError

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)