public void OnlyIncludeFilesWhichExist()
            {
                // arrange
                var mockFileSystem = MockGenerator.CreateMockFileSystem();

                // mock Bar.dll to not exist
                mockFileSystem.Setup(fs => fs.FileExists(It.IsAny <string>())).Returns <string>((s) => !s.Contains("Bar.dll"));

                var mockMSBuildProject = MockGenerator.CreateMockMSBuildProject();

                mockMSBuildProject.Setup(p => p.GetItemsWithMetadataProperty("Reference", "HintPath")).Returns(new Dictionary <string, string>()
                {
                    { "Foo", @"packages\Foo.dll" },
                    { "Bar", @"packages\Bar.dll" },
                    { "Baz", @"packages\Baz.dll" }
                });

                Dependencies.FileSystem            = mockFileSystem.Object;
                Dependencies.MSBuildProjectFactory = MockGenerator.CreateMSBuildProjectFactory(mockMSBuildProject.Object);

                // act
                var projectSystem = new NuGetMsBuildProjectSystem(@"C:\Dummy\Dummy.csproj");
                var results       = projectSystem.GetAssemblyReferencePaths();

                // assert
                string[] expected = { @"C:\Dummy\packages\Foo.dll", @"C:\Dummy\packages\Baz.dll" };
                Assert.Equal(expected, results);
            }
            public void ReturnsFullPaths(string inputPath, IEnumerable <string> expected)
            {
                // arrange
                var mockFileSystem = MockGenerator.CreateMockFileSystem();

                mockFileSystem.Setup(fs => fs.FileExists(It.IsAny <string>())).Returns(true);

                var mockMSBuildProject = MockGenerator.CreateMockMSBuildProject();

                mockMSBuildProject.Setup(p => p.GetItemsWithMetadataProperty("Reference", "HintPath")).Returns(new Dictionary <string, string>()
                {
                    { Path.GetFileNameWithoutExtension(inputPath), inputPath }
                });

                Dependencies.FileSystem            = mockFileSystem.Object;
                Dependencies.MSBuildProjectFactory = MockGenerator.CreateMSBuildProjectFactory(mockMSBuildProject.Object);

                // act
                var projectSystem = new NuGetMsBuildProjectSystem(@"C:\Dummy\Dummy.csproj");
                var results       = projectSystem.GetAssemblyReferencePaths();

                // assert
                Assert.Equal(expected, results);
            }