コード例 #1
0
        public async void CreateTest()
        {
            // Arrange
            var mockLogManager                = new Mock <ILogManager>();
            var mockContactRepository         = new Mock <IContactRepository>();
            var mockContactValidator          = new Mock <IContactValidator>();
            var mockAddressApplicationService = new Mock <IAddressApplicationService>();

            // Act
            var sut = new ContactApplicationService(
                mockLogManager.Object, mockContactRepository.Object, mockContactValidator.Object, mockAddressApplicationService.Object);
            var response = await sut.CreateAsync(It.IsAny <int>(), It.IsNotNull <ContactTypeEnum>());

            // Assert
            response.Content.Should().NotBeNull();
            response.Content.Id.Should().NotBe(0);
        }