Exemple #1
0
        public void ExecuteThrowsWhenSemanticVersionIsNotDefined(
            SemanticVersioning sut, string content)
        {
            try
            {
                File.WriteAllText(sut.AssemblyInfo, content);

                var e = Assert.Throws <InvalidOperationException>(() => sut.Execute());
                Assert.Contains(sut.AssemblyInfo, e.Message);
            }
            finally
            {
                if (File.Exists(sut.AssemblyInfo))
                {
                    File.Delete(sut.AssemblyInfo);
                }
            }
        }
Exemple #2
0
 public void SemanticVersionIsReadWritable(SemanticVersioning sut, string semanticVersion)
 {
     sut.SemanticVersion = semanticVersion;
     Assert.Equal(semanticVersion, sut.SemanticVersion);
 }
Exemple #3
0
 public void AssemblyInfoIsReadWritable(SemanticVersioning sut, string assemblyInfo)
 {
     sut.AssemblyInfo = assemblyInfo;
     Assert.Equal(assemblyInfo, sut.AssemblyInfo);
 }
Exemple #4
0
 public void SutIsTask(SemanticVersioning sut)
 {
     Assert.IsAssignableFrom <Task>(sut);
 }
 public void SemanticVersionIsReadWritable(SemanticVersioning sut, string semanticVersion)
 {
     sut.SemanticVersion = semanticVersion;
     Assert.Equal(semanticVersion, sut.SemanticVersion);
 }
 public void AssemblyInfoIsReadWritable(SemanticVersioning sut, string assemblyInfo)
 {
     sut.AssemblyInfo = assemblyInfo;
     Assert.Equal(assemblyInfo, sut.AssemblyInfo);
 }
 public void SutIsTask(SemanticVersioning sut)
 {
     Assert.IsAssignableFrom<Task>(sut);
 }
        public void ExecuteThrowsWhenSemanticVersionIsNotDefined(
            SemanticVersioning sut, string content)
        {
            try
            {
                File.WriteAllText(sut.AssemblyInfo, content);

                var e = Assert.Throws<InvalidOperationException>(() => sut.Execute());
                Assert.Contains(sut.AssemblyInfo, e.Message);
            }
            finally
            {
                if (File.Exists(sut.AssemblyInfo))
                    File.Delete(sut.AssemblyInfo);
            }
        }