Skip to content

Commit

Permalink
Prepare for RC3 build
Browse files Browse the repository at this point in the history
  • Loading branch information
donmendelson committed Mar 13, 2018
1 parent 5547612 commit ca4bf95
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 28 deletions.
2 changes: 1 addition & 1 deletion interfaces2016/src/main/resources/xsd/FixInterfaces.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<xs:annotation>
<xs:documentation>
FIX interface configuration
© Copyright 2016-2017 FIX Protocol Limited
© Copyright 2016-2018 FIX Protocol Limited
Creative Commons Attribution-NoDerivatives 4.0
International Public License
</xs:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void populateFieldMap(FieldMap fieldMap, List<?> members, Scope outScope
new GroupInstanceScope(group, groupType, repositoryAdapter, symbolResolver, evaluator)) {
try (Scope local = (Scope) symbolResolver.resolve(SymbolResolver.LOCAL_ROOT)) {
local.nest(new PathStep(groupType.getName()), groupScope);
populateFieldMap(group, blockAssignments.get(i).getFieldRef(), groupScope);
populateFieldMap(group, blockAssignments.get(i).getComponentRefOrGroupRefOrFieldRef(), groupScope);
fieldMap.addGroup(group);
}
} catch (Exception e) {
Expand All @@ -126,7 +126,7 @@ private void populateFieldMap(FieldMap fieldMap, List<?> members, Scope outScope
ComponentRefType componentRefType = (ComponentRefType) member;
List<BlockAssignmentType> blockAssignments = componentRefType.getBlockAssignment();
if (blockAssignments.size() > 0) {
List<?> blockElements = blockAssignments.get(0).getFieldRef();
List<?> blockElements = blockAssignments.get(0).getComponentRefOrGroupRefOrFieldRef();
populateFieldMap(fieldMap, blockElements, outScope);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static org.junit.Assert.*;

import java.io.File;
import java.io.InputStream;
import java.math.BigDecimal;

import javax.xml.bind.JAXBContext;
Expand Down Expand Up @@ -47,7 +48,7 @@ public class MessageScopeTest {

@BeforeClass
public static void setupOnce() throws Exception {
repository = unmarshal(new File("mit_2016.xml"));
repository = unmarshal(Thread.currentThread().getContextClassLoader().getResourceAsStream("mit_2016.xml"));
}

private MessageScope messageScope;
Expand Down Expand Up @@ -136,7 +137,7 @@ public void testResolveGroupPredicate() {
assertEquals(new BigDecimal("12.31"), node2.getValue());
}

private static Repository unmarshal(File inputFile) throws JAXBException {
private static Repository unmarshal(InputStream inputFile) throws JAXBException {
JAXBContext jaxbContext = JAXBContext.newInstance(Repository.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
return (Repository) jaxbUnmarshaller.unmarshal(inputFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
*/
package io.fixprotocol.orchestra.model.quickfix;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;

import java.io.File;
import java.io.InputStream;
import java.util.function.Function;

import javax.xml.bind.JAXBContext;
Expand All @@ -32,7 +32,6 @@
import io.fixprotocol.orchestra.model.ModelException;
import io.fixprotocol.orchestra.model.SymbolResolver;
import quickfix.Group;
import quickfix.Message;
import quickfix.field.Account;
import quickfix.field.ClOrdID;
import quickfix.field.OrdType;
Expand All @@ -51,7 +50,7 @@ public class PopulatorTest {

@BeforeClass
public static void setupOnce() throws Exception {
repository = unmarshal(new File("mit_2016.xml"));
repository = unmarshal(Thread.currentThread().getContextClassLoader().getResourceAsStream("mit_2016.xml"));
}

private RepositoryAdapter repositoryAdapter;
Expand Down Expand Up @@ -139,7 +138,7 @@ public void testPopulate() throws ModelException, quickfix.FieldNotFound {
assertEquals(clOrdId, outboundMessage.getClOrdID().getValue());
}

private static Repository unmarshal(File inputFile) throws JAXBException {
private static Repository unmarshal(InputStream inputFile) throws JAXBException {
JAXBContext jaxbContext = JAXBContext.newInstance(Repository.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
return (Repository) jaxbUnmarshaller.unmarshal(inputFile);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package io.fixprotocol.orchestra.model.quickfix;

import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.File;
import java.io.InputStream;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
Expand All @@ -17,20 +18,7 @@
import io.fixprotocol._2016.fixrepository.Repository;
import io.fixprotocol.orchestra.model.SymbolResolver;
import io.fixprotocol.orchestra.model.TestException;
import quickfix.Message;
import quickfix.SessionID;
import quickfix.SystemTime;
import quickfix.field.BeginString;
import quickfix.field.CheckSum;
import quickfix.field.MsgSeqNum;
import quickfix.field.MsgType;
import quickfix.field.SenderCompID;
import quickfix.field.SenderLocationID;
import quickfix.field.SenderSubID;
import quickfix.field.SendingTime;
import quickfix.field.TargetCompID;
import quickfix.field.TargetLocationID;
import quickfix.field.TargetSubID;
import quickfix.field.TradSesStatus;
import quickfix.field.TradingSessionID;
import quickfix.fix50sp2.TradingSessionStatus;
Expand All @@ -44,7 +32,7 @@ public class ValidatorTest {

@BeforeClass
public static void setupOnce() throws Exception {
repository = unmarshal(new File("mit_2016.xml"));
repository = unmarshal(Thread.currentThread().getContextClassLoader().getResourceAsStream("mit_2016.xml"));
}

@Before
Expand All @@ -56,7 +44,7 @@ public void setUp() throws Exception {
validator = new Validator(repositoryAdapter, symbolResolver);
}

private static Repository unmarshal(File inputFile) throws JAXBException {
private static Repository unmarshal(InputStream inputFile) throws JAXBException {
JAXBContext jaxbContext = JAXBContext.newInstance(Repository.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
return (Repository) jaxbUnmarshaller.unmarshal(inputFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<xs:annotation>
<xs:documentation>
FIX Repository standard structure of messages with workflow
© Copyright 2016-2017 FIX Protocol Limited
© Copyright 2016-2018 FIX Protocol Limited
Creative Commons Attribution-NoDerivatives 4.0
International Public License
</xs:documentation>
Expand Down

0 comments on commit ca4bf95

Please sign in to comment.