Exemplo n.º 1
0
 public void BuildTask_InvalidRuleType_Throws()
 {
     Assert.Throws <InvalidOperationException>(() => {
         TestableVersioningTask sut = new TestableVersioningTask();
         string verItemsSimple      = "**/assemblyinfo.cs;ASSXXEMBLY";
         sut.SetAllVersioningItems(verItemsSimple);
     });
 }
Exemplo n.º 2
0
        public void BuildTask_PassInRules_Works()
        {
            var v = GetDefaultVersion();
            TestableVersioningTask sut = new TestableVersioningTask();

            sut.SetVersionNumber(v);
            string verItemsSimple = "**/assemblyinfo.cs!ASSEMBLY";

            sut.SetAllVersioningItems(verItemsSimple);

            Assert.True(sut.IsThisMinimatchIncluded("**/assemblyinfo.cs"), "The minimatch was not included");
        }
Exemplo n.º 3
0
        public void BuildTask_PassInMultipleRules_Works()
        {
            var v = GetDefaultVersion();
            TestableVersioningTask sut = new TestableVersioningTask();

            sut.SetVersionNumber(v);
            string verItemsSimple =
                $"**/assemblyinfo.cs!ASSEMBLY{Environment.NewLine}xxMonkey!FILE{Environment.NewLine}yyzzxxbannana!WIX{Environment.NewLine}";

            sut.SetAllVersioningItems(verItemsSimple);

            Assert.True(sut.IsThisMinimatchIncluded("**/assemblyinfo.cs"), "The minimatch was not included");
            Assert.True(sut.IsThisMinimatchIncluded("xxMonkey"), "The second minimatch was not included");
            Assert.True(sut.IsThisMinimatchIncluded("yyzzxxbannana"), "The third minimatch was not included");
        }