public void UpdateRequestTest()
 {
     var target = new RequestDataProvider();
     request.TravelDate = request.TravelDate.AddDays(10);
     Request actual;
     string errorMessage;
     actual = target.UpdateRequest(request, out errorMessage);
     Assert.IsNotNull(actual);
     Assert.IsTrue(string.IsNullOrEmpty(errorMessage), errorMessage);
 }
 public void DeleteRequestTest()
 {
     var target = new RequestDataProvider();
     string requestId = request.RequestId;
     target.DeleteRequest(requestId);
 }
 public void RequestDataProviderConstructorTest1()
 {
     var target = new RequestDataProvider();
 }
        public void SaveRequestTest()
        {
            if (string.IsNullOrEmpty(request.RequestId))
            {
                var target = new RequestDataProvider();

                Request expected = null;
                Request actual;
                actual = target.SaveRequest(request);
                Assert.IsNotNull(actual);
                ValidateRequest(actual);
                request = actual;
            }
        }
 public void GetRequestTest()
 {
     var target = new RequestDataProvider();
     string requestId = request.RequestId;
     Request actual;
     actual = target.GetRequest(requestId);
     Assert.IsNotNull(actual);
     ValidateRequest(actual);
 }
 public void GetRequestTest1()
 {
     var target = new RequestDataProvider();
     string requestId = string.Empty;
     Request expected = null;
     Request actual;
     actual = target.GetRequest(requestId);
     Assert.AreEqual(expected, actual);
 }
 public void GetRequestIdByNumberTest1()
 {
     var target = new RequestDataProvider();
     string actual;
     actual = target.GetRequestIdByNumber(request.FriendlyRequestId);
     Assert.IsNotNull(actual);
 }
 public void GetRequestIdByNumberTest()
 {
     var target = new RequestDataProvider();
     string requestNumber = request.FriendlyRequestId;
     string expected = request.RequestId;
     string actual;
     actual = target.GetRequestIdByNumber(requestNumber);
     Assert.AreEqual(expected, actual);
 }
Esempio n. 9
0
 public string[] SaveRequest(Request request)
 {
     var requestProvider = new RequestDataProvider();
     Core.Model.Request response = requestProvider.SaveRequest(request.ToModel());
     return new[] {response.RequestId, response.FriendlyRequestId};
 }
Esempio n. 10
0
 public bool CleanUpTestRequest(string requestId)
 {
     var requestProvider = new RequestDataProvider();
     requestProvider.DeleteRequest(requestId);
     return true;
 }
Esempio n. 11
0
 public void MyTestCleanup()
 {
     var target = new RequestDataProvider();
     target.DeleteRequest(request.RequestId);
     request.RequestId = null;
 }