public void UtilizesUserIdentityProvider()
            {
                // arrange
                const string key   = "1234-5";
                var          input = Fixture.Create <UpdatePackScheduleParameters>();

                // act
                SystemUnderTest.Put(key, input);

                // assert
                MockIdentityProvider.Verify(m => m.SetUserIdentity(It.IsAny <IUpdatePackScheduleParameters>()), Times.Once());
            }
            public void UtilizesUserTokenProvider()
            {
                // arrange
                const string key = "1234";
                IRemovePackScheduleParameters actualParameters = null;

                MockPackScheduleService.Setup(m => m.RemovePackSchedule(It.IsAny <IRemovePackScheduleParameters>()))
                .Callback((IRemovePackScheduleParameters p) => actualParameters = p)
                .Returns(new SuccessResult <string>());

                // act
                SystemUnderTest.Delete(key);

                // assert
                Assert.IsNotNull(actualParameters);
                MockIdentityProvider.Verify(m => m.SetUserIdentity(actualParameters), Times.Once());
            }
            public void UtilizesUserIdentityProvider()
            {
                // arrange
                var inputParams = Fixture.Create <CreatePackSchedule>();
                var userIdentityProviderCalled = false;

                MockIdentityProvider.Setup(m => m.SetUserIdentity(It.IsAny <CreatePackScheduleParameters>()))
                .Callback((IUserIdentifiable p) =>
                {
                    userIdentityProviderCalled = true;
                });

                // act
                SystemUnderTest.Post(inputParams);

                // assert
                MockIdentityProvider.Verify(m => m.SetUserIdentity(It.IsAny <CreatePackScheduleParameters>()), Times.Once());
                Assert.True(userIdentityProviderCalled);
            }