public void CreateContainerMakesServiceStopped() { using (var container = _host.Create("kiasaki/alpine-postgres", new ContainerCreateParams { Environment = new[] { "POSTGRES_PASSWORD=mysecretpassword" } })) { Assert.AreEqual(ServiceRunningState.Stopped, container.State); } }
public async Task <IActionResult> Post([FromBody] PostHostDto dto) { if (ModelState.IsValid == false) { return(BadRequest(ModelState)); } var result = await _service.Create(dto.ToModel()).ConfigureAwait(false); return(CreatedAtAction("GetById", new { id = result.Id }, result)); }