/// <summary> /// Initialize Mitto with the given configuration /// </summary> /// <param name="pConfig"></param> public static void Initialize(ConfigParams pConfig) { LoggingFactory.Initialize(pConfig.Logger); SubscriptionFactory.Initialize(); RouterFactory.Initialize(pConfig.RouterProvider); ConnectionFactory.Initialize(pConfig.ConnectionProvider); MessagingFactory.Initialize(pConfig.MessageProvider, pConfig.MessageConverter, pConfig.MessageProcessor); MessagingFactory.Provider.Load(pConfig.Assemblies); }
public void ConfigRouterTest() { //Arrange var objProvider = Substitute.For <IRouterProvider>(); var objConnection = Substitute.For <IClient>(); RouterFactory.Initialize(objProvider); //Act var objRouter = RouterFactory.Create(objConnection); //Assert objProvider.Received(1).Create(Arg.Is(objConnection)); Assert.IsInstanceOf <IRouter>(objRouter); }