public void ChangeBugStatus_Invalid_ShouldReturnBadRequest()
        {
            var server = new InMemoryHttpServer(this.inMemoryServerUrl, repo.Object);

            var response = server.CreatePutRequest("bugs?bugId=1&status=ForTesting");

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
        }
        public void GetAllWithStatus_WhenBugsInDb_ShouldReturnStatus200()
        {
            var server = new InMemoryHttpServer(this.inMemoryServerUrl, repo.Object);

            var response = server.CreateGetRequest("bugs?status=Pending");

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.IsNotNull(response.Content);
        }
        public void CreateBug_WhenBugsInDb_ShouldReturnStatus200()
        {
            Bug bug = new Bug()
            {
                LogText = "bug-buugg"
            };

            var server = new InMemoryHttpServer(this.inMemoryServerUrl, repo.Object);

            var response = server.CreatePostRequest(string.Format("bugs?bugLogText={0}", bug.LogText), bug);

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
        }
        public void CreateBug_InvalidData_ShouldReturnBadRequest()
        {
            Bug bug = new Bug()
            {
                LogText = ""
            };

            var server = new InMemoryHttpServer(this.inMemoryServerUrl, repo.Object);

            var response = server.CreatePostRequest(string.Format("bugs?bugLogText={0}", bug.LogText), bug);

            Assert.AreEqual(HttpStatusCode.BadRequest, response.StatusCode);
        }