Skip to content

Commit 90be2ed

Browse files
Fix code of PeekThrows test in tdd-example.md (#13)
Fix `EmptyStack_PeekThrows` test code example (it was previously copy-pasted from `EmptyStack_PopThrows`)
1 parent d9fd293 commit 90be2ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/docs/tdd-example.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,11 @@ We want `Peek` to behave like `Pop` in the error condition of an empty stack, so
531531

532532
```csharp
533533
[Fact]
534-
public void EmptyStack_PopThrows()
534+
public void EmptyStack_PeekThrows()
535535
{
536536
var stack = new Stack();
537537

538-
var ex = Record.Exception(() => stack.Pop());
538+
var ex = Record.Exception(() => stack.Peek());
539539

540540
Assert.IsType<InvalidOperationException>(ex);
541541
Assert.Equal("The stack is empty", ex.Message);

0 commit comments

Comments
 (0)