public void Check_Tag90B() { string str; string value = ""; string valueType = ""; string qualifier = ""; string currency = ""; using (StreamReader sr = File.OpenText(sample515_90B)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "90B") { qualifier = block.Qualifier; valueType = block.Type; value = block.Value; currency = block.Code; } } Assert.AreEqual("10206,89", value); Assert.AreEqual("DEAL", qualifier); Assert.AreEqual("ACTU", valueType); Assert.AreEqual("USD", currency); }
public void Check_Tag70C() { string str; string value = ""; string qualifier = ""; using (StreamReader sr = File.OpenText(sample515)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "70C") { qualifier = block.Qualifier; value = block.Value; } } Assert.AreEqual("PACO", qualifier); Assert.AreEqual("GSCC/TDIDAJ101", value); }
public void Check_Tag70E() { string str; string value = ""; string qualifier = ""; using (StreamReader sr = File.OpenText(sample515_90B)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "70E") { qualifier = block.Qualifier; value = block.Value; } } Assert.AreEqual("TPRO", qualifier); Assert.AreEqual("GSCC/DEST01/DEST02/YIEL5,6 and MSRB / Yield", value); }
public void Check_Tag20() { string str; string value = ""; string valueType = ""; using (StreamReader sr = File.OpenText(sample202)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "20") { value = block.Value; valueType = block.Qualifier; } } Assert.AreEqual("1098:009:0352", value); }
public void Check_Tag35B_CountryCode() { string str; string value = ""; string valueType = ""; using (StreamReader sr = File.OpenText(sample515_90B)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "35B") { value = block.Value; valueType = block.Qualifier; } } Assert.AreEqual("78764HAD6", value); Assert.AreEqual("US", valueType); }
public void Check_Tag95Q() { string str; string value = ""; string valueType = ""; using (StreamReader sr = File.OpenText(sample515_90B)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "95Q") { value = block.Value; valueType = block.Qualifier; } } Assert.AreEqual("SELL", valueType); Assert.AreEqual("Goldman Sachs Treasury", value); }
public void Check_Tag98C() { string str; string value = ""; string valueType = ""; using (StreamReader sr = File.OpenText(samplemessagelocationlongstring)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "98C") { value = block.Value; valueType = block.Qualifier; } } Assert.AreEqual("20140114133539", value); }
public void Check_Tag28D() { string str; string value = ""; using (StreamReader sr = File.OpenText(sample101)) { str = sr.ReadToEnd(); } str = str.ConvertFromUnix(); SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "28D") { value = block.Value; } } Assert.AreEqual("1", value); }
public void Check_Tag33B() { string str; string value = ""; string valuetype = ""; using (StreamReader sr = File.OpenText(sample103)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "33B") { valuetype = block.Code; value = block.Value; } } Assert.AreEqual("3520000,", value); Assert.AreEqual("JPY", valuetype); }
public void Check_Tag59() { string str; string value = ""; string description = ""; using (StreamReader sr = File.OpenText(sample103)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "59") { value = block.Value; description = block.Description; } } Assert.AreEqual("13212312", value); Assert.AreEqual("RECEIVER NAME S.A", description); }
public void Check_Tag71G() { string str; string value = ""; string currency = ""; using (StreamReader sr = File.OpenText(sample103)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "71G") { value = block.Value; currency = block.Code; } } Assert.AreEqual("12,00", value); Assert.AreEqual("EUR", currency); }
public void Check_Tag33S() { string str; string qualifier = ""; using (StreamReader sr = File.OpenText(mockedSwiftMessage)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "33S") { qualifier = block.Qualifier; } } Assert.AreEqual("GBP", qualifier); }
public void FormatSwiftTagsToMoneyValues() { string str; using (StreamReader sr = File.OpenText(samplemessagelocation)) { str = sr.ReadToEnd(); } List <string> listOfTags = new List <string>(); TagFormatter formatter = new TagFormatter(); SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); message.Block4 = formatter.MoneyFormatter(message.Block4); foreach (var swiftTag in message.Block4) { if (swiftTag.TagName == "19A") { Assert.AreEqual("25858462.23", swiftTag.Value); } } }
public void Check_Tag32A() { string str; string value = ""; string currency = ""; string swiftDate = ""; using (StreamReader sr = File.OpenText(sample202)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "32A") { value = block.Value; currency = block.Code; swiftDate = block.Qualifier; } } Assert.AreEqual("USD", currency); Assert.AreEqual("150000,", value); Assert.AreEqual("090203", swiftDate); }
public void Check_Tag94B() { string str; string value = ""; string valueType = ""; string qualifier = ""; using (StreamReader sr = File.OpenText(sample515)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "94B") { qualifier = block.Qualifier; valueType = block.Code; value = block.Value; } } Assert.AreEqual("TRAD", qualifier); Assert.AreEqual("GSCC", valueType); Assert.AreEqual("OTMU", value); }
public void Check_Tag23G() { string str; string value = ""; string valueType = ""; using (StreamReader sr = File.OpenText(sample548_23G)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "23G") { value = block.Value; valueType = block.Code; } } Assert.AreEqual("INST", value); Assert.AreEqual("DUPL", valueType); }
public void Check_Tag19A() { string str; string value = ""; string valueType = ""; using (StreamReader sr = File.OpenText(sample548)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "19A") { value = block.Value; valueType = block.Qualifier; } } Assert.AreEqual("-25858462,", value); Assert.AreEqual("SETT", valueType); }
public void Check_Tag13A() { string str; string value = ""; using (StreamReader sr = File.OpenText(samplemessagelocationlongstring)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "13A") { value = block.Value; } } Assert.AreEqual("541", value); }
public void Check_Tag95R() { string str; string value = ""; string code = ""; string qualifier = ""; using (StreamReader sr = File.OpenText(sample515)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "95R") { value = block.Value; qualifier = block.Qualifier; code = block.Code; } } Assert.AreEqual("SELL", qualifier); Assert.AreEqual("GSCC", code); Assert.AreEqual("PART1563", value); }
public void Check_Tag36B() { string str; string value = ""; string valueType = ""; string qualifier = ""; using (StreamReader sr = File.OpenText(samplemessagelocationlongstring)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "36B") { value = block.Value; valueType = block.Type; qualifier = block.Qualifier; } } Assert.AreEqual("13300,", value); Assert.AreEqual("UNIT", valueType); Assert.AreEqual("SETT", qualifier); }
public void Check_Tag22F() { string str; string value = ""; string valueType = ""; using (StreamReader sr = File.OpenText(sample22HAlternatelocation)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "22F") { value = block.Value; valueType = block.Qualifier; } } Assert.AreEqual("TRAD", value); Assert.AreEqual("REDI", valueType); }
public void Check_Tag57D() { string str; string value = ""; using (StreamReader sr = File.OpenText(sample202)) { str = sr.ReadToEnd(); } SwiftMessage message = new SwiftMessage(); message.ParseSwiftMessage(str.Trim()); foreach (var block in message.Block4) { if (block.TagName == "57D") { value = block.Value; } } Assert.AreEqual("FW021000ABA", value); }