diff --git a/.nuget/packages.config b/.nuget/packages.config index 0335ab080..57b9c468a 100644 --- a/.nuget/packages.config +++ b/.nuget/packages.config @@ -1,5 +1,5 @@  - - + + diff --git a/.travis.yml b/.travis.yml index a0eae101d..53d693fc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,20 +3,20 @@ language: csharp mono: - - 3.12.0 - - 4.2.3 + - latest os: - osx - linux -# The newer image cannot find mono 3.12 in the PATH -osx_image: xcode6.4 - env: global: - MONO_OPTIONS=--debug +install: + - curl -L -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe + - mono nuget.exe restore LibGit2Sharp.sln + before_install: - date -u - uname -a diff --git a/CI/build.msbuild b/CI/build.msbuild index ad2b5f573..d4b0faae4 100644 --- a/CI/build.msbuild +++ b/CI/build.msbuild @@ -6,7 +6,7 @@ $(RootDir)\Build - diff --git a/Lib/NuGet/NuGet.exe b/Lib/NuGet/NuGet.exe index 9ca66594f..66794573f 100644 Binary files a/Lib/NuGet/NuGet.exe and b/Lib/NuGet/NuGet.exe differ diff --git a/LibGit2Sharp.Tests/ConfigurationFixture.cs b/LibGit2Sharp.Tests/ConfigurationFixture.cs index 7edc6dab3..3e071c3b7 100644 --- a/LibGit2Sharp.Tests/ConfigurationFixture.cs +++ b/LibGit2Sharp.Tests/ConfigurationFixture.cs @@ -366,7 +366,7 @@ public static IEnumerable ConfigAccessors } } - [Theory, PropertyData("ConfigAccessors")] + [Theory, MemberData(nameof(ConfigAccessors))] public void CanAccessConfigurationWithoutARepository(Func localConfigurationPathProvider) { var path = SandboxStandardTestRepoGitDir(); diff --git a/LibGit2Sharp.Tests/ConflictFixture.cs b/LibGit2Sharp.Tests/ConflictFixture.cs index 10d498500..cabf4a4cf 100644 --- a/LibGit2Sharp.Tests/ConflictFixture.cs +++ b/LibGit2Sharp.Tests/ConflictFixture.cs @@ -112,7 +112,7 @@ public void CanGetOriginalNamesOfRenameConflicts() } } - [Theory, PropertyData("ConflictData")] + [Theory, MemberData(nameof(ConflictData))] public void CanRetrieveSingleConflictByPath(string filepath, string ancestorId, string ourId, string theirId) { var path = SandboxMergedTestRepo(); diff --git a/LibGit2Sharp.Tests/IndexFixture.cs b/LibGit2Sharp.Tests/IndexFixture.cs index cd23df948..63dc91103 100644 --- a/LibGit2Sharp.Tests/IndexFixture.cs +++ b/LibGit2Sharp.Tests/IndexFixture.cs @@ -158,28 +158,34 @@ public void CanMoveAnExistingFileOverANonExistingFile(string sourcePath, FileSta } [Theory] - [InlineData("README", FileStatus.Unaltered, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" })] - [InlineData("new_tracked_file.txt", FileStatus.NewInIndex, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" })] - [InlineData("modified_staged_file.txt", FileStatus.ModifiedInIndex, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" })] - [InlineData("modified_unstaged_file.txt", FileStatus.ModifiedInWorkdir, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" })] - public void MovingOverAnExistingFileThrows(string sourcePath, FileStatus sourceStatus, IEnumerable destPaths) + [InlineData("README", FileStatus.Unaltered)] + [InlineData("new_tracked_file.txt", FileStatus.NewInIndex)] + [InlineData("modified_staged_file.txt", FileStatus.ModifiedInIndex)] + [InlineData("modified_unstaged_file.txt", FileStatus.ModifiedInWorkdir)] + public void MovingOverAnExistingFileThrows(string sourcePath, FileStatus sourceStatus) { + var destPaths = new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" }; + InvalidMoveUseCases(sourcePath, sourceStatus, destPaths); } [Theory] - [InlineData("new_untracked_file.txt", FileStatus.NewInWorkdir, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" })] - public void MovingAFileWichIsNotUnderSourceControlThrows(string sourcePath, FileStatus sourceStatus, IEnumerable destPaths) + [InlineData("new_untracked_file.txt", FileStatus.NewInWorkdir)] + public void MovingAFileWichIsNotUnderSourceControlThrows(string sourcePath, FileStatus sourceStatus) { + var destPaths = new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" }; + InvalidMoveUseCases(sourcePath, sourceStatus, destPaths); } [Theory] - [InlineData("deleted_unstaged_file.txt", FileStatus.DeletedFromWorkdir, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" })] - [InlineData("deleted_staged_file.txt", FileStatus.DeletedFromIndex, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" })] - [InlineData("i_dont_exist.txt", FileStatus.Nonexistent, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" })] - public void MovingAFileNotInTheWorkingDirectoryThrows(string sourcePath, FileStatus sourceStatus, IEnumerable destPaths) + [InlineData("deleted_unstaged_file.txt", FileStatus.DeletedFromWorkdir)] + [InlineData("deleted_staged_file.txt", FileStatus.DeletedFromIndex)] + [InlineData("i_dont_exist.txt", FileStatus.Nonexistent)] + public void MovingAFileNotInTheWorkingDirectoryThrows(string sourcePath, FileStatus sourceStatus) { + var destPaths = new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" }; + InvalidMoveUseCases(sourcePath, sourceStatus, destPaths); } diff --git a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj index 0be3440c6..eee61b802 100644 --- a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj +++ b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj @@ -1,6 +1,6 @@  - - + + Debug AnyCPU @@ -11,9 +11,11 @@ Properties LibGit2Sharp.Tests LibGit2Sharp.Tests - v4.0 + v4.6 512 + + true @@ -24,6 +26,7 @@ prompt 4 true + false pdbonly @@ -33,20 +36,36 @@ prompt 4 true + false - - ..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll + + ..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll + + + ..\packages\Moq.4.7.8\lib\net45\Moq.dll - - False - ..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\packages\Validation.2.4.15\lib\net45\Validation.dll + + + ..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll + True + + + ..\packages\xunit.assert.2.2.0\lib\netstandard1.1\xunit.assert.dll + + + ..\packages\xunit.extensibility.core.2.2.0\lib\netstandard1.1\xunit.core.dll + + + ..\packages\xunit.extensibility.execution.2.2.0\lib\net452\xunit.execution.desktop.dll - - ..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\packages\Xunit.SkippableFact.1.3.1\lib\net452\Xunit.SkippableFact.dll @@ -130,7 +149,6 @@ - @@ -156,9 +174,9 @@ - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - +