コード例 #1
0
        public void CreateGetDescribeProcessWithSpecifiedArgs()
        {
            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>
";
            string changes = "3327 3328 332";

            string expectedArgs = "-s -c myclient -p anotherserver:2666 -u me -P mypassword"
                                  + " describe -s " + changes;

            P4          p4      = CreateP4WithNoArgContructor(xml);
            ProcessInfo process = p4.CreateDescribeProcess(changes);

            Assert.AreEqual("c:\\bin\\p4.exe", process.FileName);
            Assert.AreEqual(expectedArgs, process.Arguments);
        }