public void CompletedEvent() {
            // Arrange
            bool premature = true;
            bool eventFired = false;
            OutstandingAsyncOperations ops = new OutstandingAsyncOperations();
            ops.Completed += (sender, eventArgs) => {
                if (premature) {
                    Assert.Fail("Event fired too early!");
                }
                if (eventFired) {
                    Assert.Fail("Event fired multiple times.");
                }

                Assert.AreEqual(ops, sender);
                Assert.AreEqual(eventArgs, EventArgs.Empty);
                eventFired = true;
            };

            // Act & assert
            ops.Increment(); // should not fire event (will throw exception)
            premature = false;

            ops.Decrement(); // should fire event
            Assert.IsTrue(eventFired);

            ops.Increment(); // should not fire event (will throw exception)
        }
        public void IncrementWithIntegerArgument() {
            // Arrange
            OutstandingAsyncOperations ops = new OutstandingAsyncOperations();

            // Act
            int returned = ops.Increment(3);
            int newCount = ops.Count;

            // Assert
            Assert.AreEqual(3, returned);
            Assert.AreEqual(3, newCount);
        }