public void StatsUploadError_WhenInvoked_ParametersAreProvided()
        {
            List <DbParameter> actualParameters = default;

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

            var uploadResult = new StatsUploadResult(100, FailedReason.UnexpectedException);

            statsDownloadDatabaseParameterServiceMock
            .CreateErrorMessageParameter(databaseConnectionServiceMock, uploadResult)
            .Returns(errorMessageParameterMock);

            systemUnderTest.StatsUploadError(uploadResult);

            Assert.That(actualParameters.Count, Is.EqualTo(2));
            Assert.That(actualParameters[0], Is.EqualTo(downloadIdParameterMock));
            Assert.That(actualParameters[1], Is.EqualTo(errorMessageParameterMock));
        }
Exemplo n.º 2
0
 public void StatsUploadError(StatsUploadResult statsUploadResult)
 {
     innerService.StatsUploadError(statsUploadResult);
 }