Ejemplo n.º 1
0
        public Desk(
            [NotNull] IDeskConnector connector)
        {
            Guard.ArgumentNotNull(connector,
                                  nameof(connector));

            _connector = connector;
        }
Ejemplo n.º 2
0
        public void Dispose_ForInvoked_CallsDeskConnector(
            Desk sut,
            [Freeze] IDeskConnector connector)
        {
            sut.Dispose( );

            connector.Received( )
            .Dispose( );
        }
Ejemplo n.º 3
0
        public void MoveStop_ForInvoked_CallsConnector(
            Desk sut,
            [Freeze] IDeskConnector connector)
        {
            sut.MoveStop( );

            connector.Received( )
            .MoveStop( );
        }
Ejemplo n.º 4
0
        public void Connect_ForInvoked_CallsDeskConnector(
            Desk sut,
            [Freeze] IDeskConnector connector)
        {
            sut.Connect( );

            connector.Received( )
            .Connect( );
        }
Ejemplo n.º 5
0
        public void MoveTo_ForTargetHeight_CallsConnector(
            Desk sut,
            [Freeze] IDeskConnector connector)
        {
            const uint targetHeight = 100u;

            sut.MoveTo(targetHeight);

            connector.Received( )
            .MoveTo(targetHeight);
        }
        public void RefreshedChanged_ForEventRaised_GetsNotified(
            Desk _,
            IDeskConnector connector,
            Subject <TSubject> subject,
            TestScheduler scheduler)
        {
            SetSubject(connector,
                       subject);

            var sut = new Desk(connector);

            SetSubscription(sut,
                            scheduler);

            subject.OnNext(default);
 protected override void SetSubject(IDeskConnector connector,
                                    Subject <int> subject)
 {
     connector.SpeedChanged
     .Returns(subject);
 }
Ejemplo n.º 8
0
 protected override void SetSubject(IDeskConnector connector,
                                    Subject <HeightSpeedDetails> subject)
 {
     connector.HeightAndSpeedChanged
     .Returns(subject);
 }
Ejemplo n.º 9
0
 protected override void SetSubject(IDeskConnector connector,
                                    Subject <bool> subject)
 {
     connector.RefreshedChanged
     .Returns(subject);
 }
Ejemplo n.º 10
0
 protected override void SetSubject(IDeskConnector connector,
                                    Subject <IEnumerable <byte> > subject)
 {
     connector.DeviceNameChanged
     .Returns(subject);
 }
 protected override void SetSubject(IDeskConnector connector,
                                    Subject <uint> subject)
 {
     connector.HeightChanged
     .Returns(subject);
 }