  In this work, we present an abstract error analysis framework for the
approximation of linear partial differential equation (PDE) problems in weak
formulation. We consider approximation methods in fully discrete formulation,
where the discrete and continuous spaces are possibly not embedded in a common
space. A proper notion of consistency is designed, and, under a classical
inf-sup condition, it is shown to bound the approximation error. This error
estimate result is in the spirit of Strang's first and second lemmas, but
applicable in situations not covered by these lemmas (because of a fully
discrete approximation space). An improved estimate is also established in a
weaker norm, using the Aubin--Nitsche trick.
  We then apply these abstract estimates to an anisotropic heterogeneous
diffusion model and two classical families of schemes for this model: Virtual
Element and Finite Volume methods. For each of these methods, we show that the
abstract results yield new error estimates with a precise and mild dependency
on the local anisotropy ratio. A key intermediate step to derive such estimates
for Virtual Element Methods is proving optimal approximation properties of the
oblique elliptic projector in weighted Sobolev seminorms. This is a result
whose interest goes beyond the specific model and methods considered here. We
also obtain, to our knowledge, the first clear notion of consistency for Finite
Volume methods, which leads to a generic error estimate involving the fluxes
and valid for a wide range of Finite Volume schemes. An important application
is the first error estimate for Multi-Point Flux Approximation L and G methods.
  In the appendix, not included in the published version of this work, we show
that classical estimates for discontinuous Galerkin methods can be obtained
with simplified arguments using the abstract framework.
