1 package org.ogf.saga.namespace.base;
2
3 import org.junit.Test;
4 import org.ogf.saga.error.DoesNotExistException;
5 import org.ogf.saga.error.IncorrectStateException;
6 import org.ogf.saga.namespace.Flags;
7 import org.ogf.saga.namespace.NSFactory;
8 import org.ogf.saga.namespace.abstracts.AbstractData;
9
10
11
12
13
14
15
16
17
18
19
20
21
22 public abstract class WriteBaseTest extends AbstractData {
23 public WriteBaseTest(String protocol) throws Exception {
24 super(protocol);
25 }
26
27 @Test(expected = DoesNotExistException.class)
28 public void test_remove() throws Exception {
29 m_file.remove(Flags.NONE.getValue());
30 NSFactory.createNSEntry(m_session, m_fileUrl, Flags.NONE.getValue());
31 }
32
33 @Test(expected = IncorrectStateException.class)
34 public void test_remove_notexist() throws Exception {
35 m_file.remove(Flags.NONE.getValue());
36 m_file.remove(Flags.NONE.getValue());
37 }
38 }