public void CanGetStreamForAllSchemaCorrectorTestFiles(SchemaCorrectorTestFile testFile)
 {
     using (var testFileStream = TestFilesFactory.GetStreamForTestFile(testFile))
     {
         Assert.NotNull(testFileStream);
         Assert.True(testFileStream.Length > 0);
     }
 }
        public void ThrowsExceptionForInvalidSchemaCorrectorEnum()
        {
            var invalidEnumIntegerValue = 0;
            var invalidEnum             = (SchemaCorrectorTestFile)invalidEnumIntegerValue;
            var enumIsValid             = Enum.IsDefined(typeof(SchemaCorrectorTestFile), invalidEnumIntegerValue);

            Assert.False(enumIsValid);
            Assert.Throws <FileNotFoundException>(() =>
            {
                TestFilesFactory.GetStreamForTestFile(invalidEnum);
            });
        }
        public void ReturnsCorrectStreamForValidEnum_1()
        {
            // Can not use hard coded length comparisons here since git
            // might normalize line endings and therefore the file is
            // not binary compatible
            var fileEnum     = ParserTestFile.GAEB_XML_3_1_Schema;
            var resourceName = "XmlTools.Tests.Testfiles.Parser.GAEB_XML_3_1_Schema.xsd";

            using (var testFilesFactoryStream = TestFilesFactory.GetStreamForTestFile(fileEnum))
            {
                Assert.NotNull(testFilesFactoryStream);
                using (var resourceStream = GetResourceStream(resourceName))
                {
                    var actualLength   = testFilesFactoryStream.Length;
                    var expectedLength = resourceStream.Length;
                    Assert.Equal(expectedLength, actualLength);
                }
            }
        }