コード例 #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 VS10ProjectReader()
 {
     VersionRetriever = new VersionRetriever();
 }
コード例 #3
0
 public void WhenTheStringIsNotAPathTheVersionIsNull()
 {
     VersionRetriever vt = new VersionRetriever();
     Assert.IsNull(vt.FileVersion("Pipapaparopo"));
 }
コード例 #4
0
 public void WhenTheFilePathIsNullTheVersionIsNull()
 {
     VersionRetriever vt = new VersionRetriever();
     Assert.IsNull(vt.FileVersion(null));
 }
コード例 #5
0
 public void WhenTheFileDoesNotHaveVersionTheVersionIsNull()
 {
     VersionRetriever vt = new VersionRetriever();
     Assert.IsNull(vt.FileVersion(Path.Combine(Environment.GetEnvironmentVariable("windir"),"bootstat.dat")));
 }
コード例 #6
0
 public void WhenTheFileDoesNotExistTheVersionIsNull()
 {
     VersionRetriever vt = new VersionRetriever();
     Assert.IsNull(vt.FileVersion("Pipapaparopo"));
 }