public void Init() { _poolService = new PoolService(); _pool = Substitute.For <IObjectPool <PoolableEntity> >(); _poolService.AddPool(_pool); }
public IActionResult Post([FromBody] Pool pool) { try { return(new JsonResult(_poolService.AddPool(pool))); } catch { return(BadRequest()); } }
public void AddPool_SameType_ThrowsException() { Assert.Throws <ArgumentException>(() => _poolService.AddPool(_pool)); }