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); } } }
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 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); } }