示例#1
0
        public async Task CreateAsync_OwnerValidationSucceed_CreatesOwner()
        {
            // Arrange
            var owner    = new OwnerUpdateModel();
            var expected = new Owner();

            var ownerDAL = new Mock <IOwnerDAL>();

            ownerDAL.Setup(x => x.InsertAsync(doctor)).ReturnsAsync(expected);

            var ownerService = new OwnerService(doctorDAL.Object);

            // Act
            var result = await ownerService.CreateAsync(owner);

            // Assert
            result.Should().Be(expected);
        }