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