public void StatsUploadFinished_WhenInvoked_ParametersAreProvided()
        {
            var transaction = Substitute.For <DbTransaction>();

            List <DbParameter> actualParameters = default;

            databaseConnectionServiceMock
            .When(service => service.ExecuteStoredProcedure(transaction, "[FoldingCoin].[StatsUploadFinished]",
                                                            Arg.Any <List <DbParameter> >())).Do(callback =>
            {
                actualParameters = callback.Arg <List <DbParameter> >();
            });

            systemUnderTest.StatsUploadFinished(transaction, 100);

            Assert.That(actualParameters.Count, Is.EqualTo(1));
            Assert.That(actualParameters[0], Is.EqualTo(downloadIdParameterMock));
        }
Exemplo n.º 2
0
 public void StatsUploadFinished(DbTransaction transaction, int downloadId)
 {
     innerService.StatsUploadFinished(transaction, downloadId);
 }