11use super :: Result ;
2+ use super :: notification_service:: NotificationServiceApi ;
3+ use super :: notification_service:: event:: IdentityChainEvent ;
24use crate :: data:: validate_node_id_network;
35use crate :: external:: file_storage:: FileStorageClientApi ;
46use crate :: util:: file:: UploadFileType ;
@@ -17,8 +19,6 @@ use async_trait::async_trait;
1719use bcr_ebill_core:: identity:: validation:: { validate_create_identity, validate_update_identity} ;
1820use bcr_ebill_core:: identity:: { ActiveIdentityState , IdentityType } ;
1921use bcr_ebill_core:: { NodeId , ServiceTraitBounds , ValidationError } ;
20- use bcr_ebill_transport:: NotificationServiceApi ;
21- use bcr_ebill_transport:: event:: identity_events:: IdentityChainEvent ;
2222use log:: { debug, error, info} ;
2323use std:: sync:: Arc ;
2424
@@ -678,9 +678,10 @@ mod tests {
678678 use super :: * ;
679679 use crate :: {
680680 external:: file_storage:: MockFileStorageClientApi ,
681+ service:: notification_service:: MockNotificationServiceApi ,
681682 tests:: tests:: {
682683 MockFileUploadStoreApiMock , MockIdentityChainStoreApiMock , MockIdentityStoreApiMock ,
683- MockNotificationService , empty_identity, empty_optional_address, init_test_cfg,
684+ empty_identity, empty_optional_address, init_test_cfg,
684685 } ,
685686 } ;
686687 use mockall:: predicate:: eq;
@@ -691,14 +692,14 @@ mod tests {
691692 Arc :: new ( MockFileUploadStoreApiMock :: new ( ) ) ,
692693 Arc :: new ( MockFileStorageClientApi :: new ( ) ) ,
693694 Arc :: new ( MockIdentityChainStoreApiMock :: new ( ) ) ,
694- Arc :: new ( MockNotificationService :: new ( ) ) ,
695+ Arc :: new ( MockNotificationServiceApi :: new ( ) ) ,
695696 )
696697 }
697698
698699 fn get_service_with_chain_storage (
699700 mock_storage : MockIdentityStoreApiMock ,
700701 mock_chain_storage : MockIdentityChainStoreApiMock ,
701- notification : MockNotificationService ,
702+ notification : MockNotificationServiceApi ,
702703 ) -> IdentityService {
703704 IdentityService :: new (
704705 Arc :: new ( mock_storage) ,
@@ -722,7 +723,7 @@ mod tests {
722723 . returning ( || Ok ( BcrKeys :: new ( ) ) ) ;
723724 let mut chain_storage = MockIdentityChainStoreApiMock :: new ( ) ;
724725 chain_storage. expect_add_block ( ) . returning ( |_| Ok ( ( ) ) ) ;
725- let mut notification = MockNotificationService :: new ( ) ;
726+ let mut notification = MockNotificationServiceApi :: new ( ) ;
726727 notification
727728 . expect_send_identity_chain_events ( )
728729 . returning ( |_| Ok ( ( ) ) )
@@ -762,7 +763,7 @@ mod tests {
762763 . returning ( || Ok ( BcrKeys :: new ( ) ) ) ;
763764 let mut chain_storage = MockIdentityChainStoreApiMock :: new ( ) ;
764765 chain_storage. expect_add_block ( ) . returning ( |_| Ok ( ( ) ) ) ;
765- let mut notification = MockNotificationService :: new ( ) ;
766+ let mut notification = MockNotificationServiceApi :: new ( ) ;
766767 notification
767768 . expect_send_identity_chain_events ( )
768769 . returning ( |_| Ok ( ( ) ) )
@@ -816,7 +817,7 @@ mod tests {
816817 . clone ( ) ,
817818 )
818819 } ) ;
819- let mut notification = MockNotificationService :: new ( ) ;
820+ let mut notification = MockNotificationServiceApi :: new ( ) ;
820821 notification
821822 . expect_send_identity_chain_events ( )
822823 . returning ( |_| Ok ( ( ) ) )
@@ -861,7 +862,7 @@ mod tests {
861862 } ) ;
862863 let mut chain_storage = MockIdentityChainStoreApiMock :: new ( ) ;
863864 chain_storage. expect_add_block ( ) . returning ( |_| Ok ( ( ) ) ) ;
864- let mut notification = MockNotificationService :: new ( ) ;
865+ let mut notification = MockNotificationServiceApi :: new ( ) ;
865866 notification. expect_send_identity_chain_events ( ) . never ( ) ;
866867
867868 let service = get_service_with_chain_storage ( storage, chain_storage, notification) ;
@@ -906,7 +907,7 @@ mod tests {
906907 } ) ;
907908 let mut chain_storage = MockIdentityChainStoreApiMock :: new ( ) ;
908909 chain_storage. expect_add_block ( ) . returning ( |_| Ok ( ( ) ) ) ;
909- let mut notification = MockNotificationService :: new ( ) ;
910+ let mut notification = MockNotificationServiceApi :: new ( ) ;
910911 notification. expect_send_identity_chain_events ( ) . never ( ) ;
911912
912913 let service = get_service_with_chain_storage ( storage, chain_storage, notification) ;
@@ -956,7 +957,7 @@ mod tests {
956957 )
957958 } ) ;
958959 chain_storage. expect_add_block ( ) . returning ( |_| Ok ( ( ) ) ) ;
959- let mut notification = MockNotificationService :: new ( ) ;
960+ let mut notification = MockNotificationServiceApi :: new ( ) ;
960961 notification
961962 . expect_send_identity_chain_events ( )
962963 . returning ( |_| Ok ( ( ) ) )
@@ -1046,7 +1047,7 @@ mod tests {
10461047 . expect_add_block ( )
10471048 . returning ( |_| Ok ( ( ) ) )
10481049 . once ( ) ;
1049- let mut notification = MockNotificationService :: new ( ) ;
1050+ let mut notification = MockNotificationServiceApi :: new ( ) ;
10501051 notification. expect_send_identity_chain_events ( ) . never ( ) ;
10511052
10521053 let service = get_service_with_chain_storage ( storage, chain_storage, notification) ;
0 commit comments