public void TestFileResponseBaseProcessMultipleDirectories() { UpdatedResponse response = new UpdatedResponse(); IList<string> lines = new List<string> { "mod1/mod2/mod3/", "/usr/local/cvsroot/sandbox/mod1/mod2/mod3/file1.cs", "/file1.cs/1.2.3.4///", "u=rw,g=rw,o=rw", "74" }; response.Initialize(lines); response.Process(); Assert.AreEqual("mod1/mod2/mod3/", response.Module); Assert.AreEqual("/file1.cs/1.2.3.4///", response.EntryLine); Assert.AreEqual("/usr/local/cvsroot/sandbox/mod1/mod2/mod3/file1.cs", response.RepositoryPath); Assert.AreEqual("file1.cs", response.Name); Assert.AreEqual("1.2.3.4", response.Revision); Assert.AreEqual("u=rw,g=rw,o=rw", response.Properties); Assert.AreEqual(74, response.Length); Assert.AreEqual(5, response.LineCount); }
private static UpdatedResponse GetMockUpdatedResponse(string path, string name) { UpdatedResponse res = new UpdatedResponse(); IList<string> lines = new List<string> { "Updated " + path, "/usr/local/cvsroot/sandbox/" + path + name, "/" + name + "/1.1.1.1///", "u=rw,g=rw,o=rw", "5" }; res.Process(lines); string text = "abcde"; res.File.Contents = text.Encode(); return res; }