Пример #1
0
        public void CreateGetChangeListsProcessWithDifferentArgs()
        {
            string xml = @"
<sourceControl name=""p4"">
  <executable>c:\bin\p4.exe</executable>
  <view>//depot/myproject/...</view>
  <client>myclient</client>
  <user>me</user>
  <password>mypassword</password>
  <port>anotherserver:2666</port>
</sourceControl>
";

            DateTime from = new DateTime(2003, 11, 20, 2, 10, 32);
            DateTime to   = new DateTime(2004, 10, 31, 5, 5, 1);

            string expectedArgs = "-s -c myclient -p anotherserver:2666 -u me -P mypassword"
                                  + " changes -s submitted //depot/myproject/...@2003/11/20:02:10:32,@2004/10/31:05:05:01";

            P4          p4      = CreateP4WithNoArgContructor(xml);
            ProcessInfo process = p4.CreateChangeListProcess(from, to);

            Assert.AreEqual("c:\\bin\\p4.exe", process.FileName);
            Assert.AreEqual(expectedArgs, process.Arguments);
        }
Пример #2
0
        public void CreateGetChangeListsProcessWithMultiLineView()
        {
            P4 p4 = new P4();

            p4.View = "//depot/myproj/...,//myotherdepot/proj/...";
            DateTime from = new DateTime(2002, 10, 20, 2, 0, 0);
            DateTime to   = new DateTime(2002, 10, 31, 5, 5, 0);

            ProcessInfo process = p4.CreateChangeListProcess(from, to);

            string expectedArgs = "-s changes -s submitted //depot/myproj/...@2002/10/20:02:00:00,@2002/10/31:05:05:00 //myotherdepot/proj/...@2002/10/20:02:00:00,@2002/10/31:05:05:00";

            Assert.AreEqual("p4", process.FileName);
            Assert.AreEqual(expectedArgs, process.Arguments);
        }
Пример #3
0
        public void CreateGetChangeListsProcessInDifferentTimeZone()
        {
            P4 p4 = new P4();

            p4.View = "//depot/myproj/...";
            DateTime from = new DateTime(2002, 10, 20, 2, 0, 0);
            DateTime to   = new DateTime(2002, 10, 31, 5, 5, 0);

            p4.TimeZoneOffset = -4.5;

            ProcessInfo process = p4.CreateChangeListProcess(from, to);

            string expectedArgs = "-s changes -s submitted //depot/myproj/...@2002/10/19:21:30:00,@2002/10/31:00:35:00";

            Assert.AreEqual("p4", process.FileName);
            Assert.AreEqual(expectedArgs, process.Arguments);
        }