Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swiftMtMx
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isc-v3.1-tmp
swiftMtMx
Commits
95a61e0a
Commit
95a61e0a
authored
Aug 19, 2024
by
lixinyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试方法更新
parent
d3bae618
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
239 additions
and
0 deletions
+239
-0
pacs.010.xml
swiftCore/src/main/resources/swiftXml/pacs.010.xml
+127
-0
Mx2ElementTest.java
swiftCore/src/test/java/com/brilliance/Mx2ElementTest.java
+85
-0
Mx2MtTest.java
swiftCore/src/test/java/com/brilliance/Mx2MtTest.java
+27
-0
No files found.
swiftCore/src/main/resources/swiftXml/pacs.010.xml
0 → 100644
View file @
95a61e0a
<?xml version="1.0" encoding="UTF-8"?>
<Saa:DataPDU
xmlns:Saa=
"urn:swift:saa:xsd:saa.2.0"
xmlns:Sw=
"urn:swift:snl:ns.Sw"
xmlns:SwGbl=
"urn:swift:snl:ns.SwGbl"
xmlns:SwInt=
"urn:swift:snl:ns.SwInt"
xmlns:SwSec=
"urn:swift:snl:ns.SwSec"
>
<Saa:Revision>
2.0.6
</Saa:Revision>
<Saa:Header>
<Saa:Message>
<Saa:SenderReference>
2023020815114929
</Saa:SenderReference>
<Saa:MessageIdentifier>
pacs.010.001.03
</Saa:MessageIdentifier>
<Saa:Format>
MX
</Saa:Format>
<Saa:Sender>
<Saa:DN>
ou=usi,o=hsbchkhh,o=swift
</Saa:DN>
</Saa:Sender>
<Saa:Receiver>
<Saa:DN>
ou=usi,o=hsbchkhh,o=swift
</Saa:DN>
</Saa:Receiver>
<Saa:NetworkInfo>
<Saa:Service>
hkicl.chats
</Saa:Service>
</Saa:NetworkInfo>
</Saa:Message>
</Saa:Header>
<Saa:Body>
<AppHdr
xmlns=
"urn:iso:std:iso:20022:tech:xsd:head.001.001.02"
>
<Fr>
<FIId>
<FinInstnId>
<BICFI>
HSBCHKHHUSI
</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>
HSBCHKHHUSI
</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>
2023020815114929
</BizMsgIdr>
<MsgDefIdr>
pacs.010.001.03
</MsgDefIdr>
<BizSvc>
hkicl.chats.rtppay.01
</BizSvc>
<CreDt>
2023-01-18T08:38:07.000+08:00
</CreDt>
<PssblDplct>
false
</PssblDplct>
</AppHdr>
<Document
xmlns=
"urn:iso:std:iso:20022:tech:xsd:pacs.010.001.03"
>
<FIDrctDbt>
<GrpHdr>
<MsgId>
2023020815114929
</MsgId>
<CreDtTm>
2023-01-18T08:38:07.000+08:00
</CreDtTm>
<NbOfTxs>
1
</NbOfTxs>
</GrpHdr>
<CdtInstr>
<CdtId>
2023020815114929
</CdtId>
<InstgAgt>
<FinInstnId>
<BICFI>
HSBCHKHHUSI
</BICFI>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BICFI>
HSBCHKHHUSI
</BICFI>
<ClrSysMmbId>
<ClrSysId>
<Cd>
HKNCC
</Cd>
</ClrSysId>
<MmbId>
012
</MmbId>
</ClrSysMmbId>
</FinInstnId>
</InstdAgt>
<CdtrAgt>
<FinInstnId>
<BICFI>
HSBCHKHHUSI
</BICFI>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<FinInstnId>
<BICFI>
HSBCHKHHUSI
</BICFI>
<LEI>
20230116095446565000
</LEI>
</FinInstnId>
</Cdtr>
<DrctDbtTxInf>
<PmtId>
<InstrId>
2023020815114929
</InstrId>
<EndToEndId>
2023020815114929
</EndToEndId>
<UETR>
b72736c6-103e-4ce5-8853-5948916e0458
</UETR>
</PmtId>
<PmtTpInf>
<LclInstrm>
<Prtry>
SI Direct Debit or Credit
</Prtry>
</LclInstrm>
<CtgyPurp>
<Prtry>
SI Direct Debit or Credit
</Prtry>
</CtgyPurp>
</PmtTpInf>
<IntrBkSttlmAmt
Ccy=
"USD"
>
1000
</IntrBkSttlmAmt>
<IntrBkSttlmDt>
2023-02-08
</IntrBkSttlmDt>
<Dbtr>
<FinInstnId>
<BICFI>
HSBCHKHHUSI
</BICFI>
<ClrSysMmbId>
<ClrSysId>
<Cd>
HKNCC
</Cd>
</ClrSysId>
<MmbId>
012
</MmbId>
</ClrSysMmbId>
</FinInstnId>
</Dbtr>
<DbtrAgt>
<FinInstnId>
<BICFI>
HSBCHKHHUSI
</BICFI>
<Nm>
DbtrAgt
</Nm>
<PstlAdr>
<TwnNm>
Town
</TwnNm>
<Ctry>
CN
</Ctry>
</PstlAdr>
</FinInstnId>
</DbtrAgt>
<Purp>
<Prtry>
OTHERS
</Prtry>
</Purp>
<RmtInf>
<Ustrd>
/DEPN/01
</Ustrd>
</RmtInf>
</DrctDbtTxInf>
</CdtInstr>
</FIDrctDbt>
</Document>
</Saa:Body>
</Saa:DataPDU>
\ No newline at end of file
swiftCore/src/test/java/com/brilliance/Mx2ElementTest.java
View file @
95a61e0a
...
@@ -57,4 +57,89 @@ public class Mx2ElementTest {
...
@@ -57,4 +57,89 @@ public class Mx2ElementTest {
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
System
.
out
.
println
(
elementStr
);
}
}
@Test
//缺少properties
public
void
testCamt105001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/camt10500102.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
//缺少properties
public
void
testCamt106001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/camt10600102.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
public
void
testCamt107001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/camt10700101.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
public
void
testCamt108001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/camt10800101.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
public
void
testCamt109001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/camt10900101.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
//没有classMxCamt05800108
public
void
testCamt058001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/camt05800108.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
//没有properties
public
void
testPain008001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/Pain00800108.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
//没有报文类型、类、配置文件
public
void
testPain002001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/MxPain00200110_full.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
//没有配置文件
public
void
testPacs003001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/MxPacs00300110.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
@Test
//没有报文类型、类、配置文件
public
void
testPacs010001
()
throws
Exception
{
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/pacs.010.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
System
.
out
.
println
(
elementStr
);
}
}
}
swiftCore/src/test/java/com/brilliance/Mx2MtTest.java
View file @
95a61e0a
...
@@ -167,6 +167,33 @@ public class Mx2MtTest {
...
@@ -167,6 +167,33 @@ public class Mx2MtTest {
@Test
@Test
public
void
test112
()
{
test
(
"/swiftXml/camt10900101.xml"
,
null
);}
public
void
test112
()
{
test
(
"/swiftXml/camt10900101.xml"
,
null
);}
@Test
//Invalid message type
public
void
test113
()
{
test
(
"/swiftXml/camt10500102.xml"
,
null
);}
@Test
//Invalid message type
public
void
test114
()
{
test
(
"/swiftXml/camt10600102.xml"
,
null
);}
@Test
public
void
test115
()
{
test
(
"/swiftXml/camt10700101.xml"
,
null
);}
@Test
public
void
test116
()
{
test
(
"/swiftXml/camt10800101.xml"
,
null
);}
@Test
public
void
test117
()
{
test
(
"/swiftXml/camt10900101.xml"
,
null
);}
@Test
public
void
test118
()
{
test
(
"/swiftXml/camt05800108.xml"
,
null
);}
@Test
//Invalid message type
public
void
test119
()
{
test
(
"/swiftXml/Pain00800108.xml"
,
null
);}
@Test
//Invalid message type
public
void
test120
()
{
test
(
"/swiftXml/MxPain00200110_full.xml"
,
null
);}
@Test
//Invalid message type
public
void
test121
()
{
test
(
"/swiftXml/MxPacs00300110.xml"
,
null
);}
@Test
//Invalid message type
public
void
test122
()
{
test
(
"/swiftXml/pacs.010.xml"
,
null
);}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment