Esempio n. 1
0
        public HttpResponseMessage Create(Customer customer)
        {
            var idAPIResult = new IdAPIResult()
            {
                Usage = "HttpPost:~/api/Customers with Customer json in body"
            };

            idAPIResult.Id = CustomerBusinessLayer.CreateCustomer(customer);

            return(Request.CreateResponse(HttpStatusCode.OK, idAPIResult));
        }
Esempio n. 2
0
 public void WillCallDBLayerOnceWhenCreate()
 {
     CustomerBusinessLayer.CreateCustomer(new Customer());
     mockDBLayer.Verify(m => m.CreateEntity <Customer>(It.IsAny <Customer>()), Times.Once);
 }