Esempio n. 1
0
        public void Test_AudioObject()
        {
            // arrange
            var sut      = af;
            var expected = typeof(Song);

            // act
            var actual = af.Create <Song>() as Song;

            // assert
            Assert.True(expected == actual.GetType());
        }
Esempio n. 2
0
        private List <AMedia> Initialize()
        {
            var audioFactory = new AudioFactory();
            var videoFactory = new VideoFactory();

            if (_mediaLibrary == null)
            {
                _mediaLibrary = new List <AMedia>();
                _mediaLibrary.AddRange(new AMedia[]
                {
                    audioFactory.Create <Book>(),
                    audioFactory.Create <Song>(),
                    videoFactory.Create <Movie>(),
                    videoFactory.Create <Photo>()
                });
            }
            return(_mediaLibrary);
        }
Esempio n. 3
0
        public AudioApplicationContext()
        {
            m_audio = AudioFactory.Create();
            m_menu  = new ContextMenuStrip();

            // Initialize Tray Icon
            m_trayIcon = new NotifyIcon()
            {
                Icon             = Resources.Speaker,
                Visible          = true,
                ContextMenuStrip = m_menu
            };
            m_trayIcon.MouseDown += TrayIcon_MouseDown;
        }