public void WhenTheFileDoesHaveVersionTheVersionIsRetrieved() { VersionRetriever vt = new VersionRetriever(); string version = vt.FileVersion(Assembly.GetCallingAssembly().Location);//nunit.framework.dll 2.5.9.10348 Assert.IsNotNull(version); Assert.AreEqual("2.5.9.10348", version); }
public void WhenTheStringIsNotAPathTheVersionIsNull() { VersionRetriever vt = new VersionRetriever(); Assert.IsNull(vt.FileVersion("Pipapaparopo")); }
public void WhenTheFilePathIsNullTheVersionIsNull() { VersionRetriever vt = new VersionRetriever(); Assert.IsNull(vt.FileVersion(null)); }
public void WhenTheFileDoesNotHaveVersionTheVersionIsNull() { VersionRetriever vt = new VersionRetriever(); Assert.IsNull(vt.FileVersion(Path.Combine(Environment.GetEnvironmentVariable("windir"),"bootstat.dat"))); }
public void WhenTheFileDoesNotExistTheVersionIsNull() { VersionRetriever vt = new VersionRetriever(); Assert.IsNull(vt.FileVersion("Pipapaparopo")); }