Beispiel #1
0
        public MySubscriptionManagerTest()
        {
            this._name = "MyTest";

            this._connectorMock   = new Mock <IMyConnector>(MockBehavior.Strict);
            this._subscriptions   = new Dictionary <int, MySubscription>();
            this._threadUtilsMock = new Mock <DelayThreadUtils>()
            {
                CallBase = true
            };

            this._requestSenderMock        = new Mock <IMyRequestSender>(MockBehavior.Strict);
            this._requestSenderFactoryMock = new Mock <IMyRequestSenderFactory>(MockBehavior.Strict);

            this._receiverMock        = new Mock <IMyDataReceiver>(MockBehavior.Strict);
            this._receiverFactoryMock = new Mock <IMyDataReceiverFactory>(MockBehavior.Strict);

            this._dispatcherMock        = new Mock <IMyDataDispatcher>(MockBehavior.Strict);
            this._dispatcherFactoryMock = new Mock <IMyDataDispatcherFactory>(MockBehavior.Strict);

            this._manager = new MySubscriptionManager(
                this._name,
                this._connectorMock.Object,
                this._subscriptions,
                this._threadUtilsMock.Object,
                this._requestSenderFactoryMock.Object,
                this._receiverFactoryMock.Object,
                this._dispatcherFactoryMock.Object);
        }
        public MySubscriptionManagerTest()
        {
            this._name = "MyTest";

            this._connectorMock = new Mock<IMyConnector>(MockBehavior.Strict);
            this._subscriptions = new Dictionary<int, MySubscription>();
            this._threadUtilsMock = new Mock<DelayThreadUtils>() { CallBase = true };

            this._requestSenderMock = new Mock<IMyRequestSender>(MockBehavior.Strict);
            this._requestSenderFactoryMock = new Mock<IMyRequestSenderFactory>(MockBehavior.Strict);

            this._receiverMock = new Mock<IMyDataReceiver>(MockBehavior.Strict);
            this._receiverFactoryMock = new Mock<IMyDataReceiverFactory>(MockBehavior.Strict);

            this._dispatcherMock = new Mock<IMyDataDispatcher>(MockBehavior.Strict);
            this._dispatcherFactoryMock = new Mock<IMyDataDispatcherFactory>(MockBehavior.Strict);

            this._manager = new MySubscriptionManager(
                this._name,
                this._connectorMock.Object,
                this._subscriptions,
                this._threadUtilsMock.Object,
                this._requestSenderFactoryMock.Object,
                this._receiverFactoryMock.Object,
                this._dispatcherFactoryMock.Object);
        }