public async Task CreateConnectionSuccessfulTest() { var cnt = (await _dao.GetAllAsync <ClusterConnectionEntity>()).Count(); var model = new ClusterConnectionEntity { ClusterType = "cluster", Name = "Connection 1" }; var result = await _controller.CreateClusterConnectionAsync(model); var cnt2 = (await _dao.GetAllAsync <ClusterConnectionEntity>()).Count(); Assert.AreEqual(cnt + 1, cnt2); Assert.IsInstanceOf <CreatedAtActionResult>(result); }
public Task <IEnumerable <TObject> > GetAllAsync <TObject>() where TObject : IEntity => _wrappedDao.GetAllAsync <TObject>();
public async Task <IActionResult> GetAllProjectsAsync() => Ok(await _dao.GetAllAsync <Project>());