public void TestReportingRoundtripOutThenInRequestMargin() { var orig = new RequestMargin { fpmlVersion = "5-10", header = new RequestMessageHeader { messageId = new MessageId { messageIdScheme = "scheme/1.0", Value = "12345678" }, //inReplyTo = new MessageId() { messageIdScheme = "scheme/1.0", Value = "87654321" }, sentBy = new MessageAddress { messageAddressScheme = "scheme/1.0", Value = "*****@*****.**" }, creationTimestamp = DateTime.Now }, correlationId = new CorrelationId { correlationIdScheme = "scheme/1.0", Value = "12345678" }, party = GetTestFragment_Parties(), account = GetTestFragment_Accounts(2), assets = new Asset[] { new Bond(), // empty new Bond { id = "id0" }, new Bond { instrumentId = new[] { new InstrumentId { instrumentIdScheme = "CUSIP", Value = "789012EW0" } } }, new Loan(), // empty new Loan { id = "id1" }, new Loan { instrumentId = new[] { new InstrumentId { instrumentIdScheme = "CUSIP", Value = "789012EW0" } } }, new Cash(), new Cash { id = "cash01" }, new Cash { currency = new Currency { Value = "USD" } }, new EquityAsset(), new EquityAsset { id = "equtiy01" }, new EquityAsset { instrumentId = new[] { new InstrumentId { instrumentIdScheme = "Bloomberg", Value = "BHP.AX" } } }, }, }; Roundtrip_OutThenIn(orig, true, true); }
public void TestReportingRoundtripOutThenInRequestMargin() { var orig = new RequestMargin { fpmlVersion = "5-3", header = new RequestMessageHeader { messageId = new MessageId { messageIdScheme = "scheme/1.0", Value = "12345678" }, //inReplyTo = new MessageId() { messageIdScheme = "scheme/1.0", Value = "87654321" }, sentBy = new MessageAddress { messageAddressScheme = "scheme/1.0", Value = "*****@*****.**" }, creationTimestamp = DateTime.Now }, correlationId = new CorrelationId { correlationIdScheme = "scheme/1.0", Value = "12345678" }, party = GetTestFragment_Parties(), account = GetTestFragment_Accounts(2), assets = new Asset[] { new Bond(), // empty new Bond { id = "id0" }, new Bond { instrumentId = new[] { new InstrumentId { instrumentIdScheme = "CUSIP", Value = "789012EW0" } } }, new Loan(), // empty new Loan { id = "id1" }, new Loan { instrumentId = new[] { new InstrumentId { instrumentIdScheme = "CUSIP", Value = "789012EW0" } } }, new Cash(), new Cash { id = "cash01" }, new Cash { currency = new Currency { Value = "USD" } }, new EquityAsset(), new EquityAsset { id = "equtiy01" }, new EquityAsset { instrumentId = new[] { new InstrumentId { instrumentIdScheme = "Bloomberg", Value = "BHP.AX" } } }, }, }; var copy = Roundtrip_OutThenIn(orig, true, true); //using (var sr = new StreamReader(internalFullPath)) //{ // string xmlText = sr.ReadToEnd(); // Assert.IsFalse(xmlText.Contains("<bond")); // Assert.IsFalse(xmlText.Contains("<loan")); // Assert.IsFalse(xmlText.Contains("<cash")); // Assert.IsFalse(xmlText.Contains("<equity")); // Assert.IsTrue(xmlText.Contains("<underlyingAsset")); //} //using (var sr = new StreamReader(externalFullPath)) //{ // string xmlText = sr.ReadToEnd(); // Assert.IsTrue(xmlText.Contains("<bond")); // Assert.IsTrue(xmlText.Contains("<loan")); // Assert.IsTrue(xmlText.Contains("<cash")); // Assert.IsTrue(xmlText.Contains("<equity")); // Assert.IsFalse(xmlText.Contains("<underlyingAsset")); //} }