static void Main(string[] args) { Wookie wookie = new Wookie() { Name = "Chewie" }; wookie.Crier((message) => { Console.WriteLine(message); }); }
public void TestCrieDuWookieQuiEstOK(string name) { Wookie wookie = new Wookie() { Name = name }; wookie.Crier((crie) => { Assert.IsInstanceOfType(crie, typeof(string)); Assert.IsNotNull(crie); string crieQuiEstAttendu = "Le wookie " + name + " crie : ROAAAAAAR !"; Assert.IsTrue(crie == crieQuiEstAttendu); }); }