コード例 #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);
                }
            }
        }
コード例 #2
0
 public void SemanticVersionIsReadWritable(SemanticVersioning sut, string semanticVersion)
 {
     sut.SemanticVersion = semanticVersion;
     Assert.Equal(semanticVersion, sut.SemanticVersion);
 }
コード例 #3
0
 public void AssemblyInfoIsReadWritable(SemanticVersioning sut, string assemblyInfo)
 {
     sut.AssemblyInfo = assemblyInfo;
     Assert.Equal(assemblyInfo, sut.AssemblyInfo);
 }
コード例 #4
0
 public void SutIsTask(SemanticVersioning sut)
 {
     Assert.IsAssignableFrom <Task>(sut);
 }
コード例 #5
0
 public void SemanticVersionIsReadWritable(SemanticVersioning sut, string semanticVersion)
 {
     sut.SemanticVersion = semanticVersion;
     Assert.Equal(semanticVersion, sut.SemanticVersion);
 }
コード例 #6
0
 public void AssemblyInfoIsReadWritable(SemanticVersioning sut, string assemblyInfo)
 {
     sut.AssemblyInfo = assemblyInfo;
     Assert.Equal(assemblyInfo, sut.AssemblyInfo);
 }
コード例 #7
0
 public void SutIsTask(SemanticVersioning sut)
 {
     Assert.IsAssignableFrom<Task>(sut);
 }
コード例 #8
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);
            }
        }