\textbf{Methods to be tested:}

\begin{itemize}
\item setTopologicalList (trivial)
\item generateNewValueCode
\item generateAcceptationCode (calls a private method acceptationAffectedOf, which calls a private method generateUpdateOneFunctional)
\item generateNewValuesFunctionalCode (calls private methods topologicalSort and generateNewValueForOneFunctional)
\item generateAcceptationFormula (calls private methods generateAcceptationFormulaGlobal, generateAcceptationFormulaOneDimensional and generateAcceptationFormulaTwoDimensional, all of which call private methods generateLikelihoodFormulaGlobal, generateLikelihoodFormulaOneDimensional, generateLikelihoodFormulaTwoDimensional and generateTransitionFormula)
\end{itemize}

\textbf{Strategy:}

Since the methods assume that the model is correct (that is, all the dependencies are valid and all needed information is given), there is no point testing the Acceptation class with invalid models. (The Parser should identify the incorrect models and stop the execution. In this testing phase the Parser is assumed to work correctly.) 

The testing should be done by calling the methods with a valid model constructed by the Parser and then inspecting the code the methods produce. It would be difficult produce a program to check the results automatically. 

For each valid model used in testing:
\begin{itemize}
\item Call setTopologicalList with a topological variable list of the current model, because it must be called before calling the other methods.
\item Call generateNewValueCode once with each non-functional not-from-data parameter
\item Call generateNewValuesFunctional once with each non-functional not-from-data parameter
\item Call generateAcceptationFormula once with each non-functional not-from-data parameter
\item Call generateAcceptationCode once with each non-functional not-from-data parameter
\end{itemize}

There is a test program AcceptationTest which runs these tests.

\textbf{Expected results:}
See Appendix 2.

%\input{content/unit_acc_simple_bird}
%\input{content/unit_acc_cancer}
%\input{content/unit_acc_all_stoc}
%\input{content/unit_acc_all_func}
%\input{content/unit_acc_all_spat}