public void ConnectorNotFound() { var db = new AppDbContext(appDbOptions); db.Connector.Add(new Connector { Name = "connName1" }); db.SaveChanges(); IAppAdminService appAdminService = new AppAdminService(db); _ = appAdminService.GetConnection("connName123"); }
public void FindConnector() { var db = new AppDbContext(appDbOptions); db.Connector.Add(new Connector { Id = id, Name = "connName1", IsActive = true }); db.SaveChanges(); IAppAdminService appAdminService = new AppAdminService(db); var connector = appAdminService.GetConnection("connName1"); Assert.AreEqual(id, connector.Id); Assert.AreEqual("connName1", connector.Name); }