@@ -351,18 +351,18 @@ func TestValidateReason(t *testing.T) {
351351 assert .Equal (t , iso18626 .TypeReasonForMessageStatusRequestResponse , reason )
352352}
353353
354- func TestPopulateVendorInNote (t * testing.T ) {
354+ func TestPrependVendorInNote (t * testing.T ) {
355355 message := iso18626.ISO18626Message {
356356 SupplyingAgencyMessage : & iso18626.SupplyingAgencyMessage {},
357357 }
358358 message .SupplyingAgencyMessage .MessageInfo .Note = ""
359- populateVendor (message .SupplyingAgencyMessage , "Alma" )
359+ prependVendorNote (message .SupplyingAgencyMessage , "Alma" )
360360 assert .Equal (t , message .SupplyingAgencyMessage .MessageInfo .Note , "Vendor: Alma" )
361361 message .SupplyingAgencyMessage .MessageInfo .Note = "some note"
362- populateVendor (message .SupplyingAgencyMessage , "Alma" )
362+ prependVendorNote (message .SupplyingAgencyMessage , "Alma" )
363363 assert .Equal (t , message .SupplyingAgencyMessage .MessageInfo .Note , "Vendor: Alma, some note" )
364364 message .SupplyingAgencyMessage .MessageInfo .Note = "#special note#"
365- populateVendor (message .SupplyingAgencyMessage , "ReShare" )
365+ prependVendorNote (message .SupplyingAgencyMessage , "ReShare" )
366366 assert .Equal (t , message .SupplyingAgencyMessage .MessageInfo .Note , "Vendor: ReShare#special note#" )
367367}
368368
@@ -816,38 +816,38 @@ func TestBlockUnfilled(t *testing.T) {
816816 assert .False (t , blockUnfilled (trCtx ))
817817}
818818
819- func TestUpdateSupplierNote (t * testing.T ) {
819+ func TestPrependSupplierSymbolNote (t * testing.T ) {
820820 sam := iso18626.SupplyingAgencyMessage {}
821821 trCtx := transactionContext {}
822- updateSupplierNote (trCtx , & sam )
822+ prependSupplierSymbolNote (trCtx , & sam )
823823 assert .Equal (t , "" , sam .MessageInfo .Note )
824824
825825 requester := ill_db.Peer {BrokerMode : string (common .BrokerModeTransparent )}
826826 trCtx .requester = & requester
827- updateSupplierNote (trCtx , & sam )
827+ prependSupplierSymbolNote (trCtx , & sam )
828828 assert .Equal (t , "" , sam .MessageInfo .Note )
829829
830830 requester .BrokerMode = string (common .BrokerModeOpaque )
831- updateSupplierNote (trCtx , & sam )
831+ prependSupplierSymbolNote (trCtx , & sam )
832832 assert .Equal (t , "" , sam .MessageInfo .Note )
833833
834834 sam .StatusInfo .Status = iso18626 .TypeStatusExpectToSupply
835- updateSupplierNote (trCtx , & sam )
835+ prependSupplierSymbolNote (trCtx , & sam )
836836 assert .Equal (t , "" , sam .MessageInfo .Note )
837837
838838 supplier := ill_db.LocatedSupplier {SupplierSymbol : "ISIL:SUP1" }
839839 trCtx .selectedSupplier = & supplier
840- updateSupplierNote (trCtx , & sam )
840+ prependSupplierSymbolNote (trCtx , & sam )
841841 assert .Equal (t , "Supplier: SUP1" , sam .MessageInfo .Note )
842842
843843 sam .MessageInfo .Note = "Original note"
844- updateSupplierNote (trCtx , & sam )
844+ prependSupplierSymbolNote (trCtx , & sam )
845845 assert .Equal (t , "Supplier: SUP1, Original note" , sam .MessageInfo .Note )
846846
847847 sam .StatusInfo .Status = iso18626 .TypeStatusUnfilled
848- sam .MessageInfo .Note = "Original note 2 "
849- updateSupplierNote (trCtx , & sam )
850- assert .Equal (t , "Supplier: SUP1, Original note 2 " , sam .MessageInfo .Note )
848+ sam .MessageInfo .Note = "#special note# "
849+ prependSupplierSymbolNote (trCtx , & sam )
850+ assert .Equal (t , "Supplier: SUP1#special note# " , sam .MessageInfo .Note )
851851}
852852
853853func TestHandleIllMessage (t * testing.T ) {
0 commit comments