michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: package org.mozilla.gecko.background.sync.helpers; michael@0: michael@0: import static junit.framework.Assert.assertNotNull; michael@0: import junit.framework.AssertionFailedError; michael@0: michael@0: import org.mozilla.gecko.sync.repositories.RepositorySession; michael@0: michael@0: public class ExpectBeginDelegate extends DefaultBeginDelegate { michael@0: @Override michael@0: public void onBeginSucceeded(RepositorySession session) { michael@0: try { michael@0: assertNotNull(session); michael@0: } catch (AssertionFailedError e) { michael@0: performNotify("Expected non-null session", e); michael@0: return; michael@0: } michael@0: performNotify(); michael@0: } michael@0: }