Пример #1
0
        public HttpResponseMessage Put(CreateSiteModel newSiteValues)
        {
            var site = new MockSite { Name = newSiteValues.Name };

            repository.Create(site);
            var response = Request.CreateResponse(HttpStatusCode.Created);

            return response;
        }
Пример #2
0
 public void IntitializeController()
 {
     repository = new FakeMockSiteRepository();
     controller = new MockSiteController(repository);
     controller.Request = new System.Net.Http.HttpRequestMessage();
     testSite = new MockSite();
     testSite.Name = "Test Site";
 }