Bonjour,
Je développe une application qui utilise NHibernate comme ORM.
Lorsque j'exécute l'application il n'y a aucun problème, mais lorsque je veux lancer des unit tests sur la partie DAO il m'envoie l'exception suivante:
System.TypeInitializationException: The type initializer for 'TrasysGR.MDP.DAO.NHibernateHelper' threw an exception.
Dois-je faire référence à un fichier de configuration lors de mon test unitaire?
Voici un test unitaire, rien de plus simple.
1 2 3 4 5 6 7 8 9 10 11 12
| [Test]
public void TestUpdateCustomer()
{
ObjectDAO depDAO = new ObjectDAO();
DepositedObject obj = depDAO.Find(50636);
if (obj != null)
{
obj.InitialAmount = 0;
depDAO.Update(obj);
}
} |
J'y connais vraiment rien en tests unitaires. Merci
Oolon
Partager