public void Test05() { var tr = new RegistryMock(SimulateRegistry04()); string dir = @"C:\Program Files\RRO\R-3.1.3"; var fs = Substitute.For <IFileSystem>(); PretendRFilesAvailable(fs, dir); var fvi = Substitute.For <IFileVersionInfo>(); fvi.FileMajorPart.Returns(3); fvi.FileMinorPart.Returns(13); fs.GetVersionInfo(dir + "R.dll").Returns(fvi); var ri = new RInstallation(tr, fs); var svl = new SupportedRVersionRange(3, 2, 3, 2); RInstallData data = ri.GetInstallationData(dir, svl); data.Status.Should().Be(RInstallStatus.UnsupportedVersion); }
public void RInstallation_Test01() { RInstallData data = RInstallation.GetInstallationData(null, 0, 0, 0, 0); data.Status.Should().BeEither(RInstallStatus.PathNotSpecified, RInstallStatus.UnsupportedVersion); }