Пример #1
0
 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);
 }
Пример #2
0
 public void WhenTheStringIsNotAPathTheVersionIsNull()
 {
     VersionRetriever vt = new VersionRetriever();
     Assert.IsNull(vt.FileVersion("Pipapaparopo"));
 }
Пример #3
0
 public void WhenTheFilePathIsNullTheVersionIsNull()
 {
     VersionRetriever vt = new VersionRetriever();
     Assert.IsNull(vt.FileVersion(null));
 }
Пример #4
0
 public void WhenTheFileDoesNotHaveVersionTheVersionIsNull()
 {
     VersionRetriever vt = new VersionRetriever();
     Assert.IsNull(vt.FileVersion(Path.Combine(Environment.GetEnvironmentVariable("windir"),"bootstat.dat")));
 }
Пример #5
0
 public void WhenTheFileDoesNotExistTheVersionIsNull()
 {
     VersionRetriever vt = new VersionRetriever();
     Assert.IsNull(vt.FileVersion("Pipapaparopo"));
 }