Exemplo n.º 1
0
        public void Arrange()
        {
            _repo  = new KomodoClaimsRepo();
            _claim = new KomodoClaims(ClaimType.Car, "Car on fire.", "$400.00", new DateTime(2020, 4, 01), new DateTime(2020, 4, 02), true);

            _repo.AddClaimToQueue(_claim);
        }
        public void Arrange()
        {
            _repo = new KomodoClaimsRepo();

            _content = new ClaimsPOCOs(1, "Car Accident on 465", 400, ClaimType.Car, DateTime.Parse("4/25/18"), DateTime.Parse("4/27/18"));

            _repo.AddClaimToQueue(_content);
        }
        public void AddContentToDirectory_ShouldGetCorrectBool()
        {
            KomodoClaimsContent testContent = new KomodoClaimsContent();
            KomodoClaimsRepo    repo        = new KomodoClaimsRepo();

            bool addResult = repo.AddClaimToDirectory(testContent);

            Assert.IsTrue(addResult);
        }
        public void AddClaimToQueue()
        {
            ClaimsPOCOs      content    = new ClaimsPOCOs();
            KomodoClaimsRepo repository = new KomodoClaimsRepo();

            bool addResult = repository.AddClaimToQueue(content);

            Assert.IsTrue(addResult);
        }
        public void GetAllDirectory_ShouldReturnCorrectList()
        {
            KomodoClaimsContent testContent = new KomodoClaimsContent();
            KomodoClaimsRepo    repo        = new KomodoClaimsRepo();

            repo.AddClaimToDirectory(testContent);

            Queue <KomodoClaimsContent> testList = repo.GetAllClaims();
            bool directoryHasContent             = testList.Contains(testContent);

            Assert.IsTrue(directoryHasContent);
        }
Exemplo n.º 6
0
        public void GetAllClaims_ShouldReturnListOfClaims()
        {
            Claim            content = new Claim();
            KomodoClaimsRepo repo    = new KomodoClaimsRepo();

            repo.AddContentToDirectory(content);
            List <Claim> fullRepo = repo.GetAllClaims();

            bool directoryHasContents = fullRepo.Contains(content);

            Assert.IsTrue(directoryHasContents);
        }
Exemplo n.º 7
0
        public void ProcessNextClaim_ShouldReturnCorrectDequeuedItem()
        {
            KomodoClaimsContent testItem = new KomodoClaimsContent();
            KomodoClaimsRepo    repo     = new KomodoClaimsRepo();

            repo.AddClaimToDirectory(testItem);

            Queue <KomodoClaimsContent> testQueue = repo.ProcessNextClaim();
            bool directoryDequeuedItem            = testQueue.Contains(testItem);

            Assert.IsTrue(directoryDequeuedItem);
        }
Exemplo n.º 8
0
        public void AddToList_ShouldGetNotNull()
        {
            // Arrange
            KomodoClaims claim = new KomodoClaims();

            claim.ClaimID = int.Parse("01");
            KomodoClaimsRepo repo = new KomodoClaimsRepo();

            // Act
            repo.AddClaimToQueue(claim);
            KomodoClaims claimFromQueue = repo.GetClaimByID(01);

            // Assert
            Assert.IsNotNull(claimFromQueue);
        }
        public void ProcessNextClaim_ShouldReturnCorrectDequeuedItem()
        {
            KomodoClaimsRepo            repo      = new KomodoClaimsRepo();
            KomodoClaimsContent         testItem  = new KomodoClaimsContent();
            Queue <KomodoClaimsContent> testQueue = new Queue <KomodoClaimsContent>();

            testQueue.Clear();
            testQueue.Enqueue(testItem);
            repo.ProcessNextClaim();

            testQueue.Dequeue();
            bool directoryHasItem = testQueue.Contains(testItem);

            Assert.IsFalse(directoryHasItem);
        }
        public void LookAtNextClaim_ShouldReturnCorrectItem()
        {
            KomodoClaimsRepo            repo      = new KomodoClaimsRepo();
            KomodoClaimsContent         testItem  = new KomodoClaimsContent();
            Queue <KomodoClaimsContent> testQueue = repo.LookAtNextClaim();

            testQueue.Clear();
            repo.AddClaimToDirectory(testItem);
            testQueue.Enqueue(testItem);

            testQueue.Peek();
            bool directoryHasItem = testQueue.Contains(testItem);

            Assert.IsTrue(directoryHasItem);
        }