public void GetClientById_PassValidGuid_ReturnsClientInstance() { IClientDAL clientDAL = new ClientDAL(new DBService(new DbConnectionService(_connectionStringName))); IClient client = clientDAL.GetClientById(DbSeeder.TestClientId); Assert.IsTrue(client != null); }
public void GetClientById_PassNewGuid_ThrowsKeyNotFoundException() { IClientDAL clientDAL = new ClientDAL(new DBService(new DbConnectionService(_connectionStringName))); Assert.ThrowsException <KeyNotFoundException>(() => clientDAL.GetClientById(Guid.NewGuid())); }