Exemplo n.º 1
0
        public async Task CreateDivorceDocsAsync_ShouldThrowDomainException_WhenRelationIsNotValid()
        {
            // Arrange
            CreateMockedObjects(out mockLogger, out mockDocRepo, out mockCachedLookupsService);
            var docService = new DivorceDocService(mockDocRepo.Object, mockLogger.Object, mockCachedLookupsService.Object);

            //Act
            //Action result = async () => await docService.CreateDivorceDocsAsync(GetTestDocs());

            //Assert
            await Assert.ThrowsAsync <DomainException>(async() => await docService.CreateDivorceDocsAsync(GetFakeInvalidDocs()));
        }
Exemplo n.º 2
0
        public async Task CreateDivorceDocsAsync_ShouldSetPriceEquals100()
        {
            // Arrange
            CreateMockedObjects(out mockLogger, out mockDocRepo, out mockCachedLookupsService);
            var docService = new DivorceDocService(mockDocRepo.Object, mockLogger.Object, mockCachedLookupsService.Object);

            //Act
            var result = await docService.CreateDivorceDocsAsync(GetFakeValidDocs());

            //Assert
            Assert.IsAssignableFrom <IEnumerable <DivorceDocResponse> >(result);
            Assert.Equal(100, result.First().DivorceDoc.Price);
        }