Exemple #1
0
        public async void CreateFeedbackCase_ShouldCallGateway()
        {
            // Arrange
            _mockGateway
            .Setup(_ => _.CreateCase(It.IsAny <Case>()))
            .ReturnsAsync(new HttpResponse <string>
            {
                StatusCode      = HttpStatusCode.OK,
                ResponseContent = "123456"
            });

            var model = new FeedbackDetails
            {
                CouncilDepartment = "test",
                Feedback          = "test"
            };

            // Act
            await _service.CreateFeedbackCase(model);

            // Assert
            _mockGateway.Verify(_ => _.CreateCase(It.IsAny <Case>()), Times.Once);
        }