Esempio n. 1
0
        public void ReturnsScannedLocationsWithResult()
        {
            Discoverer = new MsBuildPathDiscovery(FsMock.Object);

            var path = Discoverer.LocateMostRecentMsBuildPath();

            Assert.That(path.SearchLocations, Is.Not.Empty);
        }
Esempio n. 2
0
        public void LookupLocationsTracked()
        {
            Discoverer = new MsBuildPathDiscovery(FsMock.Object);
            FileSystemContents.Add("C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\msbuild.exe");

            var path = Discoverer.LocateMostRecentMsBuildPath();

            Assert.That(path.SearchLocations, Is.Not.Empty);
        }
Esempio n. 3
0
        public void SetUp()
        {
            FileSystemContents = new List <string>();

            FsMock = new Mock <IFileSystemWrapper>();
            FsMock.Setup(x => x.FileExists(It.IsAny <string>())).Returns((string s) => FileSystemContents.Contains(s));
            FsMock.Setup(x => x.DirectoryExists(It.IsAny <string>())).Returns((string s) => FileSystemContents.Contains(s));

            Discoverer = new MsBuildPathDiscovery(FsMock.Object);
            Discoverer.MsBuildLocations.Clear();
            Discoverer.MsBuildLocations.Add("c:\\msbuild.exe");
            Discoverer.MsBuildLocations.Add("c:\\other\\place\\msbuild.exe");
        }