Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 public void DeserializeXML_DuplicateURLS_Throws()
 {
     XMLDeserIntTestHelper.CreateTestXML(false);
     Assert.Throws <FileLoadException>(() => DeserializerFactory.Create(collectionContainsUniqueURLS: false));
 }
Esempio n. 3
0
 public void DeserializeXML_FileNotExists_Throws()
 {
     Assert.Throws <FileNotFoundException>(() => DeserializerFactory.Create(aFileExists: false));
 }
Esempio n. 4
0
 public void DeserializeXML_FilesNotValid_Throws()
 {
     Assert.Throws <XmlException>(() => DeserializerFactory.Create(filesValid: false));
 }
Esempio n. 5
0
 public void DeserializeXML_DirectoryNotExists_Throws()
 {
     Assert.Throws <DirectoryNotFoundException>(() => DeserializerFactory.Create(directoryExists: false));
 }