Beispiel #1
0
        public void project_equality_CRLF_normalization(string text1, string text2)
        {
            ProjectFileContent f1 = new ProjectFileContent(text1);
            ProjectFileContent f2 = new ProjectFileContent(text2);

            Assert.That(f1.EqualsWithoutVersion(f2));
        }
Beispiel #2
0
        public void replacing_or_injecting_versions(string text, string replaced)
        {
            ProjectFileContent f = new ProjectFileContent(text);
            string             r = f.GetReplacedText("XXX");

            Assert.That(r, Is.EqualTo(replaced));
        }
Beispiel #3
0
        public void replace_version_dependencies_and_extract_frameworks(string text, string frameworks)
        {
            ProjectFileContent f = new ProjectFileContent(
                text,
                name => name == "In.The.Same.Solution" ||
                name == "Another.In.The.Same.Solution" ||
                name == "CK.Core",
                // AppVeyor build machines have Environment.NewLine == "\n"!!
                normalizeLineEndings: false);
            string r = f.GetReplacedText("!TheVersion!");

            Assert.That(r, Is.EqualTo(text.Replace("VVVVVVVV", "!TheVersion!")));

            var extractedFrameworks = JSONFrameworksFinder.GetFrameworks(text);

            CollectionAssert.AreEqual(extractedFrameworks, frameworks.Split('|'));
        }
Beispiel #4
0
 public void project_equality_CRLF_normalization( string text1, string text2 )
 {
     ProjectFileContent f1 = new ProjectFileContent( text1 );
     ProjectFileContent f2 = new ProjectFileContent( text2 );
     Assert.That( f1.EqualsWithoutVersion( f2 ) );
 }
Beispiel #5
0
 public void replacing_or_injecting_versions( string text, string replaced )
 {
     ProjectFileContent f = new ProjectFileContent( text );
     string r = f.GetReplacedText( "XXX" );
     Assert.That( r, Is.EqualTo( replaced ) );
 }
Beispiel #6
0
 public void version_extraction_tests( string text, string version )
 {
     ProjectFileContent f = new ProjectFileContent( text );
     Assert.That( f.Version, Is.EqualTo( version ) );
 }
Beispiel #7
0
        public void replace_version_dependencies_and_extract_frameworks( string text, string frameworks )
        {
            ProjectFileContent f = new ProjectFileContent( 
                text, 
                name => name == "In.The.Same.Solution" 
                        || name == "Another.In.The.Same.Solution"
                        || name == "CK.Core",
                // AppVeyor build machines have Environment.NewLine == "\n"!!  
                normalizeLineEndings: false );
            string r = f.GetReplacedText( "!TheVersion!" );
            Assert.That( r, Is.EqualTo( text.Replace( "VVVVVVVV", "!TheVersion!" ) ) );

            var extractedFrameworks = JSONFrameworksFinder.GetFrameworks( text );
            CollectionAssert.AreEqual( extractedFrameworks, frameworks.Split( '|' ) );
        }
Beispiel #8
0
        public void version_extraction_tests(string text, string version)
        {
            ProjectFileContent f = new ProjectFileContent(text);

            Assert.That(f.Version, Is.EqualTo(version));
        }