Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecordTest.java')
-rw-r--r--plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecordTest.java81
1 files changed, 0 insertions, 81 deletions
diff --git a/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecordTest.java b/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecordTest.java
deleted file mode 100644
index 730a4bbc0bb..00000000000
--- a/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecordTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.core.log.record;
-
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import junit.framework.TestCase;
-import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
-
-/**
- * @author Donald G. Dunne
- */
-public class PropertyStoreRecordTest extends TestCase {
-
- public void testSimpleXmlWriting() throws XMLStreamException {
- PropertyStore store = new PropertyStore();
- store.put("test1", "data1");
- store.put("test2", "data2");
- store.put("test3", "data3");
- store.put("test4", "data4");
- PropertyStoreRecord record = new PropertyStoreRecord(store);
- XMLOutputFactory factory = XMLOutputFactory.newInstance();
- Writer stringStream = new StringWriter();
- XMLStreamWriter writer = factory.createXMLStreamWriter(stringStream);
- record.toXml(writer);
-
- Pattern pattern = Pattern.compile("key=\"test1\"");
- Matcher matcher = pattern.matcher(stringStream.toString());
- assertTrue(matcher.find());
-
- pattern = Pattern.compile("key=\"test2\"");
- matcher = pattern.matcher(stringStream.toString());
- assertTrue(matcher.find());
-
- pattern = Pattern.compile("data2");
- matcher = pattern.matcher(stringStream.toString());
- assertTrue(matcher.find());
-
- System.out.println(stringStream.toString());
-
- pattern = Pattern.compile("data4");
- matcher = pattern.matcher(stringStream.toString());
- assertTrue(matcher.find());
-
- pattern = Pattern.compile("key=\"test5\"");
- matcher = pattern.matcher(stringStream.toString());
- assertTrue(!matcher.find());
- }
-
- public void testNullPropertyStore() throws XMLStreamException {
- PropertyStoreRecord record = new PropertyStoreRecord(null);
- XMLOutputFactory factory = XMLOutputFactory.newInstance();
- Writer stringStream = new StringWriter();
- XMLStreamWriter writer = factory.createXMLStreamWriter(stringStream);
- record.toXml(writer);
- }
-
- public void testEmptyPropertyStore() throws XMLStreamException {
- PropertyStoreRecord record = new PropertyStoreRecord(new PropertyStore());
- XMLOutputFactory factory = XMLOutputFactory.newInstance();
- Writer stringStream = new StringWriter();
- XMLStreamWriter writer = factory.createXMLStreamWriter(stringStream);
- record.toXml(writer);
-
- assertTrue(stringStream.toString().length() == 31);
- }
-
-}

Back to the top