From 39d73398719fb539563248c83f92e7e0bc9e80f1 Mon Sep 17 00:00:00 2001 From: Bobby Towers Date: Mon, 13 Jun 2022 20:49:00 -0700 Subject: [PATCH 1/6] add expected output to task 3 --- exercises/concept/wizards-and-warriors/.docs/instructions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exercises/concept/wizards-and-warriors/.docs/instructions.md b/exercises/concept/wizards-and-warriors/.docs/instructions.md index 59d9e7ccf3..ce1957b9cb 100644 --- a/exercises/concept/wizards-and-warriors/.docs/instructions.md +++ b/exercises/concept/wizards-and-warriors/.docs/instructions.md @@ -45,6 +45,8 @@ Implement the `Wizard.PrepareSpell()` method to allow a Wizard to prepare a spel ```csharp var wizard = new Wizard(); wizard.PrepareSpell(); +Console.WriteLine(wizard.spellPrepared); +// => true ``` ## 4. Make Wizards vulnerable when not having prepared a spell From bb1fa6fe1d52a1bd67f9c4559a663c5b21e79e8b Mon Sep 17 00:00:00 2001 From: Bobby Towers Date: Mon, 13 Jun 2022 21:00:41 -0700 Subject: [PATCH 2/6] modify task 3 --- exercises/concept/wizards-and-warriors/.docs/instructions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/concept/wizards-and-warriors/.docs/instructions.md b/exercises/concept/wizards-and-warriors/.docs/instructions.md index ce1957b9cb..b450a1977f 100644 --- a/exercises/concept/wizards-and-warriors/.docs/instructions.md +++ b/exercises/concept/wizards-and-warriors/.docs/instructions.md @@ -45,8 +45,8 @@ Implement the `Wizard.PrepareSpell()` method to allow a Wizard to prepare a spel ```csharp var wizard = new Wizard(); wizard.PrepareSpell(); -Console.WriteLine(wizard.spellPrepared); -// => true +wizard.Vulnerable(); +// => false ``` ## 4. Make Wizards vulnerable when not having prepared a spell From 7522568ecf77863a49d2181c5c23d4b7cb7ee0b7 Mon Sep 17 00:00:00 2001 From: Bobby Towers Date: Mon, 13 Jun 2022 21:02:32 -0700 Subject: [PATCH 3/6] add unit test for task 3 --- .../wizards-and-warriors/WizardsAndWarriorsTests.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs b/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs index 71348733b4..2d5924cfab 100644 --- a/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs +++ b/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs @@ -27,6 +27,15 @@ public void Warrior_is_not_vulnerable() Assert.False(warrior.Vulnerable()); } + [Fact] + [Task(3)] + public void Warrior_is_not_vulnerable() + { + var wizard = new Wizard(); + wizard.PrepareSpell(); + Assert.False(warrior.Vulnerable()); + } + [Fact] [Task(4)] public void Wizard_is_vulnerable() From f2a7b62bf0e5e27181853c3e9320c9a57bef8341 Mon Sep 17 00:00:00 2001 From: Bobby Towers Date: Mon, 13 Jun 2022 21:10:43 -0700 Subject: [PATCH 4/6] rename task 3 test --- .../concept/wizards-and-warriors/WizardsAndWarriorsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs b/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs index 2d5924cfab..3da6ee7826 100644 --- a/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs +++ b/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs @@ -29,7 +29,7 @@ public void Warrior_is_not_vulnerable() [Fact] [Task(3)] - public void Warrior_is_not_vulnerable() + public void Warrior_is_not_vulnerable_after_preparing_spell() { var wizard = new Wizard(); wizard.PrepareSpell(); From 597f1503264eda2130c804ddc98ffd9eac4426a2 Mon Sep 17 00:00:00 2001 From: Bobby Towers Date: Mon, 13 Jun 2022 21:19:26 -0700 Subject: [PATCH 5/6] fix unit test --- .../concept/wizards-and-warriors/WizardsAndWarriorsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs b/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs index 3da6ee7826..ace0ecb49e 100644 --- a/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs +++ b/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs @@ -33,7 +33,7 @@ public void Warrior_is_not_vulnerable_after_preparing_spell() { var wizard = new Wizard(); wizard.PrepareSpell(); - Assert.False(warrior.Vulnerable()); + Assert.False(wizard.Vulnerable()); } [Fact] From 6ec1735d542d7eadca2bd204578f116546636851 Mon Sep 17 00:00:00 2001 From: Bobby Towers Date: Mon, 13 Jun 2022 21:24:57 -0700 Subject: [PATCH 6/6] fix test description --- .../concept/wizards-and-warriors/WizardsAndWarriorsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs b/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs index ace0ecb49e..ed362d9fb0 100644 --- a/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs +++ b/exercises/concept/wizards-and-warriors/WizardsAndWarriorsTests.cs @@ -29,7 +29,7 @@ public void Warrior_is_not_vulnerable() [Fact] [Task(3)] - public void Warrior_is_not_vulnerable_after_preparing_spell() + public void Wizard_is_not_vulnerable_after_preparing_spell() { var wizard = new Wizard(); wizard.PrepareSpell();