PageRenderTime 23ms CodeModel.GetById 19ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/com/google/appengine/datanucleus/TxnIdAnswer.java

http://datanucleus-appengine.googlecode.com/
Java | 40 lines | 13 code | 4 blank | 23 comment | 0 complexity | ec43b6bc230cbdd2601f8b66be54cf45 MD5 | raw file
 1/**********************************************************************
 2Copyright (c) 2009 Google Inc.
 3
 4Licensed under the Apache License, Version 2.0 (the "License");
 5you may not use this file except in compliance with the License.
 6You may obtain a copy of the License at
 7
 8http://www.apache.org/licenses/LICENSE-2.0
 9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15**********************************************************************/
16package com.google.appengine.datanucleus;
17
18import org.easymock.IAnswer;
19
20import com.google.appengine.datanucleus.jdo.JDOTransactionTest;
21import com.google.appengine.datanucleus.jpa.JPATransactionTest;
22
23/**
24 * Useful for tests that need to configure mock transactions.
25 *
26 * @see {@link JDOTransactionTest}
27 * @see {@link JPATransactionTest}
28 *
29 * @author Max Ross <maxr@google.com>
30 */
31public class TxnIdAnswer implements IAnswer<String> {
32  private String expectedTxnId;
33  public String answer() {
34    return expectedTxnId;
35  }
36
37  public void setExpectedTxnId(String expectedTxnId) {
38    this.expectedTxnId = expectedTxnId;
39  }
40}