コード例 #1
0
ファイル: DeviceProxyTest.cs プロジェクト: afzaljan/iotedge
        public void SetInactiveMakesInactive()
        {
            var twinHandler         = Mock.Of <ITwinHandler>();
            var m2mHandler          = Mock.Of <IModuleToModuleMessageHandler>();
            var c2dHandler          = Mock.Of <ICloud2DeviceMessageHandler>();
            var directMethodHandler = Mock.Of <IDirectMethodHandler>();
            var identity            = new DeviceIdentity("hub", "device_id");

            var sut = new DeviceProxy(identity, twinHandler, m2mHandler, c2dHandler, directMethodHandler);

            Assert.True(sut.IsActive);

            sut.SetInactive();

            Assert.False(sut.IsActive);
        }