From 02a67c08adec48db1bdfd2228d436cb725593924 Mon Sep 17 00:00:00 2001 From: anorborg Date: Sat, 14 Feb 2015 14:03:35 -0800 Subject: [PATCH] added test --- AttemptationUnitTests/AttempterServiceActionTests.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AttemptationUnitTests/AttempterServiceActionTests.cs b/AttemptationUnitTests/AttempterServiceActionTests.cs index cc6033a..49bbe81 100644 --- a/AttemptationUnitTests/AttempterServiceActionTests.cs +++ b/AttemptationUnitTests/AttempterServiceActionTests.cs @@ -21,5 +21,15 @@ public void TryReturnsFalseOnFailedAction() Assert.IsFalse(succeeded); } + + [TestMethod] + public void TryReturnsTrueOnSucceededAction() + { + var attempter = Attempter.Create(new MockService()); + + var succeeded = attempter.Try(s => s.MockAction(throwException: false)); + + Assert.IsTrue(succeeded); + } } }