Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Experiments / Generator / Generators / Model / Templates / Test.cs
blobc06f5266addc9601666ef8365f9cc07561c9013f
1 using System;
2 using NUnit.Framework;
3 using <%= Namespace %>;
5 namespace <%= TestsNamespace %>
7 /// <summary>
8 /// Test unitaire pour <%= Name %>.
9 /// </summary>
10 [TestFixture]
11 public class <%= ClassName %>Test : ActiveRecordTestCase
13 [Test]
14 public void Create()
16 <%= ClassName %> new<%= ClassName %> = new <%= ClassName %>();
18 // Initialize new<%= ClassName %>
20 new<%= ClassName %>.Create();
22 <%= ClassName %> db<%= ClassName %> = <%= ClassName %>.FindAll()[0];
24 //Assert.AreEqual(new<%= ClassName %>.UnAttribut, db<%= ClassName %>.UnAttribut);
27 [Test]
28 public void FindAll()
30 Create();
32 Assert.AreEqual(1, <%= ClassName %>.FindAll().Length);
35 [Test]
36 public void Delete()
38 Create();
40 <%= ClassName %>.FindAll()[0].Delete();
42 Assert.AreEqual(0, <%= ClassName %>.FindAll().Length);