View Javadoc

1   /*
2    * $Id: TextFileObjectStoreContractTestCase.java 19191 2010-08-25 21:05:23Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.util.store;
12  
13  import org.mule.api.store.ObjectStore;
14  
15  import java.io.Serializable;
16  
17  public class TextFileObjectStoreContractTestCase extends AbstractObjectStoreContractTestCase
18  {
19      private TextFileObjectStore objectStore;
20  
21      @Override
22      protected void doSetUp() throws Exception
23      {
24          super.doSetUp();
25  
26          objectStore = new TextFileObjectStore();
27          objectStore.setMuleContext(muleContext);
28          objectStore.initialise();
29      }
30      
31      @Override
32      protected void doTearDown() throws Exception
33      {
34          objectStore.dispose();
35          super.doTearDown();
36      }
37  
38      @Override
39      @SuppressWarnings("unchecked")
40      public ObjectStore getObjectStore()
41      {
42          return objectStore;
43      }
44  
45      @Override
46      public Serializable getStorableValue()
47      {
48          return "This is the value";
49      }
50  }
51  
52