Example #1
0
        public void WebsiteCategoryRepository_GetWebsiteCategory_StateMismatch()
        {
            //Arrange
            AddWebsiteCategoryToDatabase();

            var repository = new WebsiteCategoryRepository(new DatabaseFactory(Database));

            //Act
            var websiteCategory = repository.GetWebsiteCategory(GovernmentType.FEDERAL_EXECUTIVE, "General Services AdministratioN", "General Services Administration", "WashingtoN", "WA");

            //Assert
            Assert.IsNull(websiteCategory);
        }
Example #2
0
        public void WebsiteCategoryRepository_GetWebsiteCategory_DomainTypeMismatch()
        {
            //Arrange
            AddWebsiteCategoryToDatabase();

            var repository = new WebsiteCategoryRepository(new DatabaseFactory(Database));

            //Act
            var websiteCategory = repository.GetWebsiteCategory(GovernmentType.FEDERAL_LEGISLATIVE, "General Services AdministratioN", "Office of Citizen Services and CommunicationS", "WashingtoN", "Dc");

            //Assert
            Assert.IsNull(websiteCategory);
        }
Example #3
0
        public void WebsiteCategoryRepository_GetWebsiteCategory_AgencyMismatch()
        {
            //Arrange
            AddWebsiteCategoryToDatabase();

            var repository = new WebsiteCategoryRepository(new DatabaseFactory(Database));

            //Act
            var websiteCategory = repository.GetWebsiteCategory(GovernmentType.FEDERAL_EXECUTIVE, "White House", "Office of Citizen Services and CommunicationS", "WashingtoN", "Dc");

            //Assert
            Assert.IsNull(websiteCategory);
        }
Example #4
0
        public void WebsiteCategoryRepository_GetWebsiteCategory()
        {
            //Arrange
            AddWebsiteCategoryToDatabase();

            var repository = new WebsiteCategoryRepository(new DatabaseFactory(Database));

            //Act
            var websiteCategory = repository.GetWebsiteCategory(GovernmentType.FEDERAL_EXECUTIVE, "General Services AdministratioN", "Office of Citizen Services and CommunicationS", "WashingtoN", "Dc");

            //Assert
            Assert.IsNotNull(websiteCategory);
            Assert.AreEqual(websiteCategory.Id, 3691);
            Assert.AreEqual(websiteCategory.GovernmentType, websiteCategory.GovernmentType);
            Assert.AreEqual("General Services Administration", websiteCategory.Agency);
            Assert.AreEqual("Office of Citizen Services and Communications", websiteCategory.Organization);
            Assert.AreEqual("Washington", websiteCategory.City);
            Assert.AreEqual("DC", websiteCategory.State);
        }