06-UnitTesting/TestCode/2-Tdd_create_from_usage.cs (12 lines of code) (raw):

using NUnit.Framework; namespace JetBrains.ReSharper.Koans.UnitTesting { [TestFixture] public class TddCreateFromUsage { [Test] public void ShouldAddTwoNumbers() { // 1. Uncomment these lines // 2. <shortcut id="Show context actions">Alt+Enter</shortcut> on Calculator and create from usage // 3. <shortcut id="Show context actions">Alt+Enter</shortcut> on Add and create from usage // 4. Implement Add to make test pass // 5. Use the move refactoring to move the Calculator class to the UnitTesting-ProductionCode project //var calculator = new Calculator(); //Assert.AreEqual(3, calculator.Add(1, 2)); } } }