public IActionResult Post([FromBody] string input) { try { _recordsService.AddFromString(input); return(Ok()); } catch { return(BadRequest()); } }
public void AddFromStringTestNullstring() { Assert.Throws <ArgumentNullException>(() => { _service.AddFromString(null); }); _repoMock.Verify(x => x.AddRecord(It.IsAny <Person>()), Times.Never); }