Beispiel #1
0
        public void PostCollection_DuplicateURLS_ReturnsFalse()
        {
            var collectionValidator = new CollectionValidator();
            var posts  = XMLDeserIntTestHelper.CreateTestCollection(false);
            var result = collectionValidator.CollectionContainsUniqueURLS(posts, out string errorMSG);

            Assert.IsFalse(result);
            Assert.IsNotEmpty(errorMSG);
        }
        public void Deserialize_CompareResultSetToOriginalSet_AreEqual()
        {
            XMLDeserIntTestHelper.CreateTestXML(true);

            var posts  = XMLDeserIntTestHelper.CreateTestCollection();
            var deser  = DeserializerFactory.Create();
            var result = deser.Posts;

            Assert.That(posts.SequenceEqual(result));
        }
Beispiel #3
0
        public static void CreateTestXML(bool isDataValid)
        {
            var posts = CreateTestCollection(isDataValid);

            XMLDeserIntTestHelper.CreateXMLFromCollection(posts);
        }
 public void DeserializeXML_DuplicateURLS_Throws()
 {
     XMLDeserIntTestHelper.CreateTestXML(false);
     Assert.Throws <FileLoadException>(() => DeserializerFactory.Create(collectionContainsUniqueURLS: false));
 }
 public void TearDown()
 {
     XMLDeserIntTestHelper.DeleteTestDir();
 }
 public void Setup()
 {
     XMLDeserIntTestHelper.CreateTestDir();
 }
Beispiel #7
0
 private static void CreateValidXMLDirectory()
 {
     XMLDeserIntTestHelper.CreateTestXML(true);
 }
Beispiel #8
0
 public void Setup()
 {
     XMLDeserIntTestHelper.CreateTestDir();
     DiskArchiveValidatorIntegrationTests.LoadXSDFile();
 }