public void Incorrect_Message_Error_Outcome() { // Arrange var processor = new AdaptationOutcomeProcessor(Mock.Of <ILogger <AdaptationOutcomeProcessor> >()); IDictionary <string, object> headerMap = new Dictionary <string, object>(); // Act var result = processor.Process(headerMap, null); // Assert Assert.That(result, Is.EqualTo(ReturnOutcome.GW_ERROR), "expected the outcome to be 'error'"); }
public void Failed_Return_Failed_Outcome() { // Arrange var processor = new AdaptationOutcomeProcessor(Mock.Of <ILogger <AdaptationOutcomeProcessor> >()); IDictionary <string, object> headerMap = new Dictionary <string, object> { { "file-id", Encoding.UTF8.GetBytes("737ba1cc-492c-4292-9a2c-fc7bfc722dc6") }, { "file-outcome", Encoding.UTF8.GetBytes("failed") }, }; // Act var result = processor.Process(headerMap, null); // Assert Assert.That(result, Is.EqualTo(ReturnOutcome.GW_FAILED), "expected the outcome to be 'failed'"); }
public void Missing_FileId_Returns_Error_Outcome_And_Empty_Guid() { // Arrange var headers = new Dictionary <string, object>(); // Act var outcome = _adaptationOutcomeProcessor.Process(headers); // Assert Assert.That(outcome.Key, Is.EqualTo(Guid.Empty)); Assert.That(outcome.Value, Is.EqualTo(AdaptationOutcome.Error)); }