diff options
author | donald.g.dunne | 2015-12-23 19:54:49 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2015-12-23 19:54:49 +0000 |
commit | 82b1c027fa407dcdeaae4676c91681e3cdd9fa6c (patch) | |
tree | 2c235ec876df29269b683ed69ecf2ef432375ec9 /plugins/org.eclipse.osee.orcs.core.test | |
parent | ad0d071519a7e37e8d6f81906c4c9690a3de3a31 (diff) | |
download | org.eclipse.osee-82b1c027fa407dcdeaae4676c91681e3cdd9fa6c.tar.gz org.eclipse.osee-82b1c027fa407dcdeaae4676c91681e3cdd9fa6c.tar.xz org.eclipse.osee-82b1c027fa407dcdeaae4676c91681e3cdd9fa6c.zip |
refinement: Re-Organize, Format and Cleanup source
Change-Id: I71e686df3d68f22622f492a8dc0c168b4adc5c4d
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.core.test')
18 files changed, 96 insertions, 92 deletions
diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/ds/LoadDataHandlerDecoratorTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/ds/LoadDataHandlerDecoratorTest.java index 4d4bb2f9542..ffa634cefc6 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/ds/LoadDataHandlerDecoratorTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/ds/LoadDataHandlerDecoratorTest.java @@ -32,7 +32,7 @@ public class LoadDataHandlerDecoratorTest { @Mock private AttributeData attrData; @Mock private RelationData relData; @Mock private LoadDescription description; - @Mock private MatchLocation match; + @Mock private MatchLocation match; // @formatter:on diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeClassResolverTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeClassResolverTest.java index c12dcc7ee39..5a08e821219 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeClassResolverTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeClassResolverTest.java @@ -15,7 +15,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; -import org.junit.Assert; import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.orcs.core.AttributeClassProvider; @@ -29,6 +28,7 @@ import org.eclipse.osee.orcs.core.internal.attribute.primitives.JavaObjectAttrib import org.eclipse.osee.orcs.core.internal.attribute.primitives.PrimitiveAttributeClassProvider; import org.eclipse.osee.orcs.core.internal.attribute.primitives.StringAttribute; import org.eclipse.osee.orcs.data.AttributeTypes; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeCollectionTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeCollectionTest.java index 67299e4e79c..e78c8fbaa4c 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeCollectionTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeCollectionTest.java @@ -15,6 +15,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import com.google.common.collect.Iterables; import java.util.Collection; import java.util.List; import org.eclipse.osee.framework.core.data.IAttributeType; @@ -28,7 +29,6 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import com.google.common.collect.Iterables; /** * Test Case for {@link AttributeCollection} diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchTest.java index 293d2ef5216..aee466b5749 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchTest.java @@ -24,28 +24,28 @@ import org.junit.Test; */ public class BranchUtilBranchTest { - private final Branch one = new Branch(Lib.generateUuid(), "one", BranchType.WORKING, BranchState.COMMITTED, true, - false); - private final Branch two = new Branch(Lib.generateUuid(), "two", BranchType.WORKING, BranchState.COMMITTED, true, - false); - private final Branch three = new Branch(Lib.generateUuid(), "three", BranchType.WORKING, BranchState.COMMITTED, - true, false); - private final Branch four = new Branch(Lib.generateUuid(), "four", BranchType.WORKING, BranchState.COMMITTED, true, - false); - private final Branch five = new Branch(Lib.generateUuid(), "five", BranchType.WORKING, BranchState.COMMITTED, true, - false); - private final Branch six = new Branch(Lib.generateUuid(), "six", BranchType.WORKING, BranchState.COMMITTED, true, - false); - private final Branch seven = new Branch(Lib.generateUuid(), "seven", BranchType.WORKING, BranchState.COMMITTED, - true, false); - private final Branch eight = new Branch(Lib.generateUuid(), "eight", BranchType.WORKING, BranchState.COMMITTED, - true, false); - private final Branch nine = new Branch(Lib.generateUuid(), "nine", BranchType.WORKING, BranchState.COMMITTED, true, - false); - private final Branch ten = new Branch(Lib.generateUuid(), "ten", BranchType.WORKING, BranchState.COMMITTED, true, - false); - private final Branch outside = new Branch(Lib.generateUuid(), "outside", BranchType.WORKING, BranchState.COMMITTED, - true, false); + private final Branch one = + new Branch(Lib.generateUuid(), "one", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch two = + new Branch(Lib.generateUuid(), "two", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch three = + new Branch(Lib.generateUuid(), "three", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch four = + new Branch(Lib.generateUuid(), "four", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch five = + new Branch(Lib.generateUuid(), "five", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch six = + new Branch(Lib.generateUuid(), "six", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch seven = + new Branch(Lib.generateUuid(), "seven", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch eight = + new Branch(Lib.generateUuid(), "eight", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch nine = + new Branch(Lib.generateUuid(), "nine", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch ten = + new Branch(Lib.generateUuid(), "ten", BranchType.WORKING, BranchState.COMMITTED, true, false); + private final Branch outside = + new Branch(Lib.generateUuid(), "outside", BranchType.WORKING, BranchState.COMMITTED, true, false); private void initBranchParentageList() { two.setParentBranch(one); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProviderTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProviderTest.java index e36e3e1e876..8256a182070 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProviderTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProviderTest.java @@ -14,11 +14,11 @@ import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Set; -import org.junit.Assert; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.cache.BranchFilter; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.junit.Assert; import org.junit.Test; /** diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/graph/GraphUtilTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/graph/GraphUtilTest.java index 74752f4c23b..e3b4a3c90fa 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/graph/GraphUtilTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/graph/GraphUtilTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ package org.eclipse.osee.orcs.core.internal.graph; -import static org.eclipse.osee.framework.core.enums.CoreBranches.SYSTEM_ROOT_ID; import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON_ID; +import static org.eclipse.osee.framework.core.enums.CoreBranches.SYSTEM_ROOT_ID; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.when; diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ProxyImplTestSuite.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ProxyImplTestSuite.java index a1a94853b11..0482d5d3c0b 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ProxyImplTestSuite.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ProxyImplTestSuite.java @@ -17,7 +17,10 @@ import org.junit.runners.Suite; * @author Roberto E. Escobar */ @RunWith(Suite.class) -@Suite.SuiteClasses({ArtifactReadOnlyImplTest.class, AttributeReadOnlyImplTest.class, ExternalArtifactManagerTest.class}) +@Suite.SuiteClasses({ + ArtifactReadOnlyImplTest.class, + AttributeReadOnlyImplTest.class, + ExternalArtifactManagerTest.class}) public class ProxyImplTestSuite { // Test Suite } diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationTypeValidityTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationTypeValidityTest.java index 660b2a8147b..50c9f277402 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationTypeValidityTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationTypeValidityTest.java @@ -56,7 +56,7 @@ public class RelationTypeValidityTest { // @formatter:off @Mock private RelationTypes relTypes; @Mock private RelationNode node; - @Mock private IArtifactType artifactType; + @Mock private IArtifactType artifactType; @Mock private IArtifactType artifactType2; @Mock private IRelationType relationType1; @@ -237,7 +237,8 @@ public class RelationTypeValidityTest { when(node.getExceptionString()).thenReturn("node message"); thrown.expect(OseeArgumentException.class); - thrown.expectMessage("Relation validity error for [node message] - ArtifactType [artType1] does not belong on side [SIDE_B] of relation [TYPE_1] - only items of type [artType2] are allowed"); + thrown.expectMessage( + "Relation validity error for [node message] - ArtifactType [artType1] does not belong on side [SIDE_B] of relation [TYPE_1] - only items of type [artType2] are allowed"); validity.checkRelationTypeValid(TYPE_1, node, SIDE_B); } diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java index 84d044fd458..37caa923a90 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java @@ -17,6 +17,7 @@ import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import com.google.common.collect.Iterables; import java.util.Collection; import java.util.List; import org.eclipse.osee.framework.core.data.HasLocalId; @@ -33,7 +34,6 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import com.google.common.collect.Iterables; /** * Test Case for {@link RelationNodeAdjacencies} diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java index 873317a3920..17f41eeffa2 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java @@ -54,8 +54,8 @@ public class OrderParserTest { private static final String REL_TYPE_2_NAME = "Another Type"; private static final Long REL_TYPE_2_ID = 1231L; - private static final List<String> ORDER_LIST_1 = Arrays.asList("AAABDEJ_mIQBf8VXVtGqvA", "AAABDEJ_nMkBf8VXVXptpg", - "AAABDEJ_oQ8Bf8VXLX7U_g"); + private static final List<String> ORDER_LIST_1 = + Arrays.asList("AAABDEJ_mIQBf8VXVtGqvA", "AAABDEJ_nMkBf8VXVXptpg", "AAABDEJ_oQ8Bf8VXLX7U_g"); private static final List<String> ORDER_LIST_2 = Arrays.asList("AAABDEJ_mIQBf8VXVtGqvA"); private static final List<String> ORDER_LIST_3 = Arrays.asList("AAABDEJ_mIQXf8VXVtGqvA", "AAABDEJ_oQVBf8VXLX7U_g"); @@ -68,8 +68,8 @@ public class OrderParserTest { private static final String DATA_1 = String.format(ONE_ENTRY_PATTERN, REL_TYPE_1_NAME, RelationSide.SIDE_B, RelationOrderBaseTypes.USER_DEFINED.getGuid(), Collections.toString(",", ORDER_LIST_1)); private static final String DATA_2 = String.format(ONE_ENTRY_PATTERN, REL_TYPE_1_NAME, RelationSide.SIDE_B, RelationOrderBaseTypes.USER_DEFINED.getGuid(), Collections.toString(",", ORDER_LIST_2)); - private static final String DATA_3 = String.format(TWO_ENTRY_PATTERN, - REL_TYPE_1_NAME, RelationSide.SIDE_B, RelationOrderBaseTypes.USER_DEFINED.getGuid(), Collections.toString(",", ORDER_LIST_2), + private static final String DATA_3 = String.format(TWO_ENTRY_PATTERN, + REL_TYPE_1_NAME, RelationSide.SIDE_B, RelationOrderBaseTypes.USER_DEFINED.getGuid(), Collections.toString(",", ORDER_LIST_2), REL_TYPE_2_NAME, RelationSide.SIDE_A, RelationOrderBaseTypes.LEXICOGRAPHICAL_ASC.getGuid(), Collections.toString(",", ORDER_LIST_3)); private static final String DATA_4 = String.format(ONE_ENTRY_NO_LIST_PATTERN, REL_TYPE_2_NAME, RelationSide.SIDE_A, RelationOrderBaseTypes.LEXICOGRAPHICAL_DESC.getGuid()); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterProviderTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterProviderTest.java index 12c332b0f02..d25e87b587e 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterProviderTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterProviderTest.java @@ -83,9 +83,9 @@ public class SorterProviderTest { @Test public void testGetDefaultSorterIdTypeNotfound() throws OseeCoreException { thrown.expect(OseeArgumentException.class); - thrown.expectMessage(String.format( - "defaultOrderTypeGuid cannot be null - Invalid default order type uuid for [%s]", - CoreRelationTypes.Allocation__Component)); + thrown.expectMessage( + String.format("defaultOrderTypeGuid cannot be null - Invalid default order type uuid for [%s]", + CoreRelationTypes.Allocation__Component)); provider.getDefaultSorterId(CoreRelationTypes.Allocation__Component); } @@ -136,8 +136,8 @@ public class SorterProviderTest { String idName = "TestSorterId"; IRelationSorterId sorterId = TokenFactory.createSorterId(randomGuid, "TestSorterId"); thrown.expect(OseeArgumentException.class); - thrown.expectMessage(String.format("sorter cannot be null - Unable to locate sorter with sorterId [%s:%s]", - idName, randomGuid)); + thrown.expectMessage( + String.format("sorter cannot be null - Unable to locate sorter with sorterId [%s:%s]", idName, randomGuid)); provider.getSorter(sorterId); } } diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/OrcsScriptEngineTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/OrcsScriptEngineTest.java index a669661ecb2..8ec3f8caf71 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/OrcsScriptEngineTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/OrcsScriptEngineTest.java @@ -16,6 +16,7 @@ import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import com.google.common.io.CharStreams; import java.io.IOException; import java.io.Reader; import javax.script.Bindings; @@ -33,7 +34,6 @@ import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import com.google.common.io.CharStreams; /** * Test Case for {@link ScriptEngines} {@link OrcsScriptEngine} diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandlerTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandlerTest.java index 1914d3c7d5d..d7cb2e5d788 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandlerTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandlerTest.java @@ -49,25 +49,25 @@ public class ExcelOutputHandlerTest { "Heading 7", "Heading 8"}; - private static final String[] values = { - "one", - "two", - "three", - "four", - "five", - "six", - "seven", + private static final String[] values = { + "one", + "two", + "three", + "four", + "five", + "six", + "seven", "eight"}; - private static final String[] groups = { - "group 1", - "group 2", - "group 3", - "group 4", + private static final String[] groups = { + "group 1", + "group 2", + "group 3", + "group 4", "group 5"}; private static final String[] innerName = { - "name", + "name", "value"}; @Mock private ScriptContext context; diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterTest.java index 35845e36c55..23a65f7e14a 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterTest.java @@ -82,6 +82,8 @@ import static org.junit.Assert.assertNull; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import com.google.common.base.Charsets; +import com.google.common.collect.Iterables; import java.io.ByteArrayInputStream; import java.util.Arrays; import java.util.Collections; @@ -120,8 +122,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import com.google.common.base.Charsets; -import com.google.common.collect.Iterables; /** * Test Case for {@link OrcsScriptInterpreterImpl} {@link OrcsScriptAssemblerImpl} @@ -199,17 +199,17 @@ public class OrcsScriptInterpreterTest { assertEquals(true, data.hasChildren()); checkNamesAndLevels(data.getChildren(), 0, // - branch_archive_state,// - branch_associated_art_id,// - branch_baseline_tx_id,// + branch_archive_state, // + branch_associated_art_id, // + branch_baseline_tx_id, // branch_id, // branch_inherit_access_cntrl, // branch_name, // branch_parent_id, // branch_parent_tx_id, // - branch_state,// + branch_state, // branch_type // - ); + ); } @Test @@ -243,7 +243,7 @@ public class OrcsScriptInterpreterTest { tx_date, // tx_id, // tx_type // - ); + ); } @Test @@ -282,8 +282,8 @@ public class OrcsScriptInterpreterTest { @Test public void testArtifactQuery2() { - OrcsScript model = - newModel("start from branch 570 find artifacts where art-id = 34 collect artifacts {id, txs{*}, attributes {*}, relations {*} };"); + OrcsScript model = newModel( + "start from branch 570 find artifacts where art-id = 34 collect artifacts {id, txs{*}, attributes {*}, relations {*} };"); interpreter.interpret(model, assembler); verify(output, times(0)).onError(Matchers.any(Throwable.class)); @@ -322,7 +322,7 @@ public class OrcsScriptInterpreterTest { art_tx_date, // art_tx_id, // art_tx_type // - ); + ); DynamicObject attrs = asObject(Iterables.get(data.getChildren(), 2, null)); assertEquals(true, attrs.hasParent()); @@ -353,8 +353,8 @@ public class OrcsScriptInterpreterTest { @Test public void testArtifactQuery3() { - OrcsScript model = - newModel("start from branch 570 find artifacts where art-id = 34 collect artifacts {id, txs{*}, attributes {id, txs{*} }, relations {id, txs{*} } };"); + OrcsScript model = newModel( + "start from branch 570 find artifacts where art-id = 34 collect artifacts {id, txs{*}, attributes {id, txs{*} }, relations {id, txs{*} } };"); interpreter.interpret(model, assembler); verify(output, times(0)).onError(Matchers.any(Throwable.class)); @@ -393,7 +393,7 @@ public class OrcsScriptInterpreterTest { art_tx_date, // art_tx_id, // art_tx_type // - ); + ); DynamicObject attrs = asObject(Iterables.get(data.getChildren(), 2, null)); assertEquals(true, attrs.hasParent()); @@ -414,7 +414,7 @@ public class OrcsScriptInterpreterTest { attr_tx_date, // attr_tx_id, // attr_tx_type // - ); + ); DynamicObject rels = asObject(Iterables.get(data.getChildren(), 3, null)); assertEquals(true, rels.hasParent()); @@ -435,13 +435,13 @@ public class OrcsScriptInterpreterTest { rel_tx_date, // rel_tx_id, // rel_tx_type // - ); + ); } @Test public void testFollowQuery() { - OrcsScript model = - newModel("start from branch 570 find artifacts where art-id = 34 follow relation type = 'Default Hierarchical' to side-B collect artifacts {id, txs{ id }, attributes {id, txs{id} }, relations {id, txs{id} } }; "); + OrcsScript model = newModel( + "start from branch 570 find artifacts where art-id = 34 follow relation type = 'Default Hierarchical' to side-B collect artifacts {id, txs{ id }, attributes {id, txs{id} }, relations {id, txs{id} } }; "); interpreter.interpret(model, assembler); verify(output, times(0)).onError(Matchers.any(Throwable.class)); @@ -480,7 +480,7 @@ public class OrcsScriptInterpreterTest { assertEquals(true, artTxs.hasChildren()); checkNamesAndLevels(artTxs.getChildren(), 1, // art_tx_id // - ); + ); DynamicObject attrs = asObject(Iterables.get(data.getChildren(), 2, null)); assertEquals(true, attrs.hasParent()); @@ -494,7 +494,7 @@ public class OrcsScriptInterpreterTest { assertEquals(true, attrTxs.hasChildren()); checkNamesAndLevels(attrTxs.getChildren(), 1, // attr_tx_id // - ); + ); DynamicObject rels = asObject(Iterables.get(data.getChildren(), 3, null)); assertEquals(true, rels.hasParent()); @@ -508,7 +508,7 @@ public class OrcsScriptInterpreterTest { assertEquals(true, relTxs.hasChildren()); checkNamesAndLevels(relTxs.getChildren(), 1, // rel_tx_id // - ); + ); } private Integer intVal(int integer) { diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/ChangeSetBuilderTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/ChangeSetBuilderTest.java index 5784f172552..359bdc7e9e2 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/ChangeSetBuilderTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/ChangeSetBuilderTest.java @@ -13,6 +13,7 @@ package org.eclipse.osee.orcs.core.internal.transaction; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; +import com.google.common.collect.Iterables; import org.eclipse.osee.orcs.core.ds.ArtifactData; import org.eclipse.osee.orcs.core.ds.AttributeData; import org.eclipse.osee.orcs.core.ds.OrcsChangeSet; @@ -23,7 +24,6 @@ import org.eclipse.osee.orcs.core.internal.relation.Relation; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; -import com.google.common.collect.Iterables; /** * Test Case for {@link ChangeSetBuilder} diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManagerTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManagerTest.java index 3a916a9c1a5..2ea544d51d4 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManagerTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManagerTest.java @@ -484,8 +484,7 @@ public class TxDataManagerTest { @Test public void testIntroduceArtifact() throws OseeCoreException { ResultSet<Artifact> loaded = ResultSets.singleton(artifact1); - when(loader.loadArtifacts(eq(session), eq(COMMON_ID), anyCollectionOf(ArtifactId.class))).thenReturn( - loaded); + when(loader.loadArtifacts(eq(session), eq(COMMON_ID), anyCollectionOf(ArtifactId.class))).thenReturn(loaded); when(artifactFactory.introduceArtifact(session, artifact1, artifact1, BRANCH_ID)).thenReturn(artifact2); when(proxyManager.asExternalArtifact(session, artifact2)).thenReturn(readable2); when(artifact1.getGraph()).thenReturn(graph); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java index 43005bbf893..26879179725 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java @@ -15,6 +15,12 @@ import static org.eclipse.osee.framework.core.enums.RelationSide.SIDE_B; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; import static org.mockito.Mockito.when; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Multimap; +import com.google.common.io.ByteStreams; +import com.google.common.io.InputSupplier; +import com.google.common.io.Resources; +import com.google.common.util.concurrent.Callables; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -54,12 +60,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; -import com.google.common.io.ByteStreams; -import com.google.common.io.InputSupplier; -import com.google.common.io.Resources; -import com.google.common.util.concurrent.Callables; /** * Test Case for {@link OrcsTypesImpl} @@ -410,19 +410,19 @@ public class OrcsTypesTest { //@formatter:on //@formatter:off - String overrideArtTypes = + String overrideArtTypes = "\n overrides artifactType \"Artifact\" {\n" + " inheritAll \n" + - " update attribute \"Annotation\" branchUuid "+BRANCH_A_UUID+"\n" + + " update attribute \"Annotation\" branchUuid "+BRANCH_A_UUID+"\n" + "}\n" + "\n overrides artifactType \"Other Artifact\" {\n" + " inheritAll \n" + - " add attribute \"Field 2\" \n" + + " add attribute \"Field 2\" \n" + "}\n" + "\n overrides artifactType \"SubSystem Requirement\" {\n" + " inheritAll \n" + - " remove attribute \"Field 1\" \n" + - "}\n" + " remove attribute \"Field 1\" \n" + + "}\n" ; //@formatter:on @@ -438,7 +438,8 @@ public class OrcsTypesTest { assertContains(artTypes.getAttributeTypes(OTHER_ARTIFACT, BRANCH_D), NAME, ANNOTATION, FIELD_2); assertContains(artTypes.getAttributeTypes(OTHER_ARTIFACT, BRANCH_E), NAME, FIELD_2); - assertContains(artTypes.getAttributeTypes(SUBSYSTEM_REQUIREMENT, CoreBranches.SYSTEM_ROOT), NAME, WORDML, FIELD_2); + assertContains(artTypes.getAttributeTypes(SUBSYSTEM_REQUIREMENT, CoreBranches.SYSTEM_ROOT), NAME, WORDML, + FIELD_2); assertContains(artTypes.getAttributeTypes(SUBSYSTEM_REQUIREMENT, BRANCH_A), NAME, ANNOTATION, WORDML, FIELD_2); assertContains(artTypes.getAttributeTypes(SUBSYSTEM_REQUIREMENT, BRANCH_B), NAME, WORDML, FIELD_2); assertContains(artTypes.getAttributeTypes(SUBSYSTEM_REQUIREMENT, BRANCH_C), NAME, WORDML, FIELD_2); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/util/OrcsPredicatesTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/util/OrcsPredicatesTest.java index 202a02511d4..1f63ca9ea73 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/util/OrcsPredicatesTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/util/OrcsPredicatesTest.java @@ -25,6 +25,7 @@ import static org.eclipse.osee.orcs.core.internal.util.OrcsPredicates.nodeIdsEqu import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; +import com.google.common.base.Predicate; import java.util.Date; import java.util.regex.Pattern; import org.eclipse.osee.framework.core.data.HasLocalId; @@ -38,7 +39,6 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import com.google.common.base.Predicate; /** * Test Case for {@link OrcsPredicates} |