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()); }
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); }
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; }