SetITunesInstance() public method

public SetITunesInstance ( ) : void
return void
コード例 #1
0
ファイル: MainFormTest.cs プロジェクト: pipipierre/Notpod-1.x
        public void CheckIfITunesLibrary_whenNetworkDrive_correctlyChecksPath()
        {
            var appFactory = MockRepository.GenerateStub <ITunesAppFactory>();
            var mockITunes = MockRepository.GenerateStub <iTunesApp>();

            appFactory.Stub(x => x.GetNewInstance()).Return(mockITunes);

            mockITunes.Stub(x => x.Version).Return("Test");
            mockITunes.Stub(x => x.LibraryXMLPath).Return("\\\\networkdrive");

            MainForm form = new MainForm();

            form.ITunesAppFactory = appFactory;
            form.SetITunesInstance();
            Assert.IsFalse(form.CheckIfiTunesLibrary("E:\\"));
        }
コード例 #2
0
ファイル: MainFormTest.cs プロジェクト: notpod/Notpod-1.x
        public void CheckIfITunesLibrary_whenNetworkDrive_correctlyChecksPath()
        {

        	var appFactory = MockRepository.GenerateStub<ITunesAppFactory>();
        	var mockITunes = MockRepository.GenerateStub<iTunesApp>();
        	
        	appFactory.Stub(x => x.GetNewInstance()).Return(mockITunes);
        	
        	mockITunes.Stub(x => x.Version).Return("Test");
        	mockITunes.Stub(x => x.LibraryXMLPath).Return("\\\\networkdrive");
        	
        	MainForm form = new MainForm();
        	form.ITunesAppFactory = appFactory;
        	form.SetITunesInstance();
            Assert.IsFalse(form.CheckIfiTunesLibrary("E:\\"));
            
        }