예제 #1
0
        public void NewClaim_ClaimId_AreEqual()
        {
            var expected = ClaimId.NewId();

            var claim = new Domain.Claim(expected);
            var actual = claim.Id;

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void AssignPolicyTwice_WithDifferentPolicyNo_Throws()
        {
            var claimId = ClaimId.NewId();

            var claim = new Domain.Claim(claimId);

            claim.AssignPolicy(PolicyNo.FromString("PO1"), _policyService.Object);
            claim.AssignPolicy(PolicyNo.FromString("PO2"), _policyService.Object);
        }
예제 #3
0
        public void AssignPolicy_ClaimNo_AreNotEmpty()
        {
            var claimId = ClaimId.NewId();
            var claim = new Domain.Claim(claimId);

            var policyNo = PolicyNo.FromString("PO123");
            claim.AssignPolicy(policyNo, _policyService.Object);

            Assert.AreNotEqual(ClaimNo.Empty, claim.ClaimNo);
        }
예제 #4
0
        public void AssignPolicy_PolicyNo_AreEqual()
        {
            var claimId = ClaimId.NewId();
            var claim = new Domain.Claim(claimId);

            var expected = PolicyNo.FromString("PO123");
            claim.AssignPolicy(expected, _policyService.Object);
            var actual = claim.PolicyNo;

            Assert.AreEqual(expected, actual);
        }