Ejemplo n.º 1
0
 public ClaimService(CarInsClaimsAppContext context, IUserService userService)
 {
     this.context = context
                    ?? throw new ClaimException(ExceptionMessages.ContextIsNull);
     this.userService = userService
                        ?? throw new ClaimException(ExceptionMessages.UserServiceIsNull);
 }
Ejemplo n.º 2
0
        public async Task ThrowNullReferenceException_NegatuveClaimAmount()
        {
            string  testClaimTitle    = "Title";
            string  testDescription   = "Description";
            int     testPolicyId      = 11111;
            decimal testAmount        = -3456;
            string  testPersonalEmail = "*****@*****.**";

            byte[] testPhoto = new byte[0];
            var    options   = TestUtilities.GetOptions(nameof(ThrowNullReferenceException_NegatuveClaimAmount));

            using (var assertContext = new CarInsClaimsAppContext(options))
            {
                var sut = new ClaimService(assertContext, userService.Object);
                await sut.CreateClaim(testClaimTitle, testDescription, testPolicyId, testAmount, testPersonalEmail, testPhoto);
            }
        }
Ejemplo n.º 3
0
 public UserService(CarInsClaimsAppContext context)
 {
     this.context = context
                    ?? throw new ClaimException(ExceptionMessages.ContextIsNull);
 }