The Oakes Test:
First, the objective to be served by the measures limiting a Charter right must be sufficiently important to warrant overriding a constitutionally protected right or freedom.
Second, the party invoking s. 1 must show the means to be reasonable and demonstrably justified. This involves a form of proportionality test involving three important components.
To begin, the measures must be fair and not arbitrary, carefully designed to achieve the objective in question and rationally connected to that objective.
In addition, the means should impair the right in question as little as possible.
Lastly, there must be a proportionality between the effects of the limiting measure and the objective -- the more severe the deleterious effects of a measure, the more important the objective must be.
This test was developed in R. v. Oakes  1 SCR 103. The Supreme Court modified it several months later in R. v. Edwards Books & Art  2 SCR 713; in that case the Court addressed idea of 'impairing as little as possible' and allowed more flexibility to allow a reasonable margin rather than a 'precise line'. Since, the SCC has referred to "margin of appreciation" to allow legislature some room to set the level of impairment. (Irwin Tow v. Quebec  1 SCR 927,