コード例 #1
0
ファイル: VssTest.cs プロジェクト: kascomp/CruiseControl.NET
		public void SetUp()
		{
			CreateProcessExecutorMock(DEFAULT_SS_EXE_PATH);
			mockRegistry = new DynamicMock(typeof(IRegistry)); mockProcessExecutor.Strict = true;
			mockRegistry.SetupResult("GetExpectedLocalMachineSubKeyValue", DEFAULT_SS_EXE_PATH, typeof(string), typeof(string));
			VssLocale locale = new VssLocale(CultureInfo.InvariantCulture);
			historyParser = new VssHistoryParser(locale);

			vss = new Vss(locale, historyParser, (ProcessExecutor) mockProcessExecutor.MockInstance, (IRegistry) mockRegistry.MockInstance);
			vss.Project = "$/fooProject";
			vss.Culture = string.Empty; // invariant culture
			vss.Username = "******";
			vss.Password = "******";
			vss.WorkingDirectory = DefaultWorkingDirectory;

			today = DateTime.Now;
			yesterday = today.AddDays(-1);
		}
コード例 #2
0
        public void ParseCheckedInFileAndFolderInFrench()
        {
            // change the parser culture for this test only
            parser = new VssHistoryParser(new VssLocale(new CultureInfo("fr-FR")));

            string entry = @"*****  happyTheFile.txt  *****
            Version 16
            Utilisateur: Admin        Date:  25/11/02   Heure: 17:32
            Archivé dans $/you/want/folders/i/got/em
            Commentaire: adding this file makes me so happy";

            string expectedFile = "happyTheFile.txt";
            string expectedFolder = "$/you/want/folders/i/got/em";

            Modification mod = ParseAndAssertFilenameAndFolder(entry, expectedFile, expectedFolder);
            Assert.AreEqual("Admin", mod.UserName);
            Assert.AreEqual(new DateTime(2002, 11, 25, 17, 32, 0), mod.ModifiedTime);
            Assert.AreEqual("Archivé dans", mod.Type);
            Assert.AreEqual("adding this file makes me so happy",mod.Comment);
        }
コード例 #3
0
		public void SetUp()
		{
			parser = new VssHistoryParser(new VssLocale(CultureInfo.InvariantCulture));
		}