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); }
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); }
public void SetUp() { parser = new VssHistoryParser(new VssLocale(CultureInfo.InvariantCulture)); }