Ejemplo n.º 1
0
        public OutputDeviceModelTests()
        {
            var master   = MasterSessionModelTests.GetMasterMock(deviceName, 70, false, new BitmapImage());
            var sessions = new ObservableCollection <AudioSessionModel>();

            sessions.Add(AudioSessionModelTests.GetSessionMock("app", 50, false));

            this.deviceMock = new Mock <IDevice>();

            this.deviceMock.Setup(m => m.GetId()).Returns(deviceId);

            this.deviceStateMock = new Mock <IDeviceStateNotificationHandler>();
            this.sProviderMock   = new Mock <ISessionProvider>();

            this.model = new OutputDeviceModel(deviceMock.Object, deviceStateMock.Object, sProviderMock.Object, master, sessions);
        }
Ejemplo n.º 2
0
        internal static OutputDeviceModel GetDeviceMock(string id, string name, IDeviceStateNotificationHandler deviceStateHandler)
        {
            var master   = MasterSessionModelTests.GetMasterMock(name, 70, false, null);
            var sessions = new ObservableCollection <AudioSessionModel>();

            sessions.Add(AudioSessionModelTests.GetSessionMock("app", 50, false));

            var deviceMock = new Mock <IDevice>();

            deviceMock.Setup(m => m.GetId()).Returns(id);

            var sProviderMock = new Mock <ISessionProvider>();

            return(new OutputDeviceModel(deviceMock.Object, deviceStateHandler, sProviderMock.Object, master,
                                         sessions));
        }