Пример #1
0
        /// <summary>
        /// Gets the mock checkout responses.
        /// </summary>
        /// <param name="time">The mod time.</param>
        /// <param name="path">The local system path.</param>
        /// <param name="file">The file name.</param>
        /// <returns>list of mock responses</returns>
        public static IList<IResponse> GetMockCheckoutResponses(string time, string path, string file)
        {
            IList<IResponse> responses = new List<IResponse>();
             IResponse r = new ModTimeResponse();
             r.Initialize(new List<string> { time });
             responses.Add(r);
             var list = GetMockMTResponseGroup(path + file);
             foreach (IResponse response in list)
             {
            responses.Add(response);
             }

             responses.Add(GetMockUpdatedResponse(path, file));

             return responses;
        }
Пример #2
0
 public void TestModTimeResponse()
 {
     ModTimeResponse response = new ModTimeResponse();
      ResponseTest(response, ResponseType.ModTime, 1, "11/27/2009 2:21:06 PM", new List<string> { "27 Nov 2009 14:21:06 -0000" });
      DateTime expected = new DateTime(2009, 11, 27, 14, 21, 6);
      Assert.AreEqual(expected, response.ModTime);
 }