test: add tests for the majority of the Core assembly #6
❌️ Test Results - 106/110, failed: 4 - Failed in 1.427s
❌️ editmode-results.xml - 106/110, failed: 4 - Failed in 1.427s
Details
❌️ editmode-results.xml - 106/110, failed: 4 - Failed in 1.427s
- ✅ UnityGit.Tests.Core.Data.CredentialsTests.IsValid_ReturnsWhetherCredentialsAreValid - 4/4 - Passed in 0.030s
- ✅ IsValid_ReturnsWhetherCredentialsAreValid("","",False) - Passed in 0.024s
- ✅ IsValid_ReturnsWhetherCredentialsAreValid("name","",False) - Passed in 0.002s
- ✅ IsValid_ReturnsWhetherCredentialsAreValid("","password123",False) - Passed in 0.002s
- ✅ IsValid_ReturnsWhetherCredentialsAreValid("name","password123",True) - Passed in 0.002s
- ✅ UnityGit.Tests.Core.Data.GitCommandInfoTests - 1/1 - Passed in 0.003s
- ✅ It_Should_Return_Proper_String_Representation - Passed in 0.003s
- ✅ UnityGit.Tests.Core.FileStatusUtilitiesTests - 17/17 - Passed in 0.219s
- ✅ Exists_ReturnsFalse_WhenEntryHasNonexistentOrDeletedFlags - Passed in 0.184s
- ✅ Exists_ReturnsFalse_WhenStatusHasDeletedFlags - Passed in 0.002s
- ✅ Exists_ReturnsFalse_WhenStatusHasNonexistentFlag - Passed in 0.002s
- ✅ Exists_ReturnsTrue_WhenEntryDoesNotExistFlagsAreNotSet - Passed in 0.003s
- ✅ Exists_ReturnsTrue_WhenStatusDoesNotExistFlagsAreNotSet - Passed in 0.002s
- ✅ IsDeleted_ReturnsFalse_WhenStatusDoesNotHaveDeletedFlags - Passed in 0.002s
- ✅ IsDeleted_ReturnsTrue_WhenStatusHasDeletedFlags - Passed in 0.002s
- ✅ IsModified_ReturnsFalse_WhenEntryDoesNotHaveModifiedFlags - Passed in 0.003s
- ✅ IsModified_ReturnsFalse_WhenStatusDoesNotHaveModifiedFlags - Passed in 0.002s
- ✅ IsModified_ReturnsTrue_WhenEntryHasModifiedFlags - Passed in 0.002s
- ✅ IsModified_ReturnsTrue_WhenStatusHasModifiedFlags - Passed in 0.002s
- ✅ IsNew_ReturnsFalse_WhenEntryDoesNotHaveNewFlags - Passed in 0.002s
- ✅ IsNew_ReturnsFalse_WhenStatusDoesNotHaveNewFlags - Passed in 0.002s
- ✅ IsNew_ReturnsTrue_WhenEntryHasNewFlags - Passed in 0.002s
- ✅ IsNew_ReturnsTrue_WhenStatusHasNewFlags - Passed in 0.002s
- ✅ IsRenamed_ReturnsFalse_WhenStatusDoesNotHaveRenamedFlags - Passed in 0.002s
- ✅ IsRenamed_ReturnsTrue_WhenStatusHasRenamedFlags - Passed in 0.002s
- ✅ UnityGit.Tests.Core.GitProcessTests - 4/4 - Passed in 0.283s
- ✅ It_Outputs_Error_Lines - Passed in 0.066s
- ✅ It_Runs_The_Git_Command - Passed in 0.174s
- ✅ It_Should_Return_Proper_String_Representation - Passed in 0.007s
- ✅ It_Times_Out_After_Given_Milliseconds - Passed in 0.037s
- ✅ UnityGit.Tests.Core.Services.BranchServiceTests - 7/7 - Passed in 0.058s
- ✅ GetBranchName_ReturnsBranchFriendlyName - Passed in 0.027s
- ✅ IsAheadOfRemote_ReturnsFalse_WhenBranchDoesNotExist - Passed in 0.012s
- ✅ IsAheadOfRemote_ReturnsFalse_WhenBranchIsNotAheadOfRemote - Passed in 0.003s
- ✅ IsAheadOfRemote_ReturnsTrue_WhenBranchIsAheadOfRemote - Passed in 0.004s
- ✅ IsBehindRemote_ReturnsFalse_WhenBranchDoesNotExist - Passed in 0.004s
- ✅ IsBehindRemote_ReturnsFalse_WhenBranchIsNotBehindRemote - Passed in 0.006s
- ✅ IsBehindRemote_ReturnsTrue_WhenBranchIsBehindRemote - Passed in 0.003s
- ✅ UnityGit.Tests.Core.Services.CheckoutServiceTests - 5/5 - Passed in 0.149s
- ✅ CheckoutBranch_ChecksOutBranch - Passed in 0.129s
- ✅ CheckoutBranch_LogsCheckedOutBranchMessage - Passed in 0.004s
- ✅ CheckoutBranch_LogsCheckoutMessage - Passed in 0.004s
- ✅ CheckoutBranch_LogsExceptionIfCheckoutFails - Passed in 0.006s
- ✅ ForceCheckoutPaths_CallsCheckoutPathsOnRepository - Passed in 0.007s
- ✅ UnityGit.Tests.Core.Services.CommitServiceTests - 14/14 - Passed in 0.075s
- ✅ CommitSelected_CallsStageAndFileSelectionChangedForEachSelectedFileInRepositories - Passed in 0.022s
- ✅ CommitSelected_ClearsCommittedFilesDictionary - Passed in 0.003s
- ✅ CommitSelected_Creates_A_Commit - Passed in 0.005s
- ✅ CommitSelected_Creates_Progress_Indicator - Passed in 0.004s
- ✅ CommitSelected_Invokes_CommitCreated_Event - Passed in 0.004s
- ✅ CommitSelected_Stages_EachSelectedFile - Passed in 0.004s
- ✅ DeselectFile_DoesNotRemoveFileIfRepositoryDoesNotExistInCommittedFilesDictionary - Passed in 0.004s
- ✅ DeselectFile_RemovesFileFromCommittedFilesDictionaryAndInvokesFileSelectionChangedEvent - Passed in 0.004s
- ✅ GetSelectedCount_ReturnsCorrectCount_WhenFilesAreSelected - Passed in 0.003s
- ✅ GetSelectedCount_ReturnsZero_WhenFilesAreSelectedThenDeselected - Passed in 0.003s
- ✅ GetSelectedCount_ReturnsZero_WhenNoFilesAreSelected - Passed in 0.003s
- ✅ Reports_Error_When_Committing_Empty_Commit - Passed in 0.007s
- ✅ Reports_Exceptions - Passed in 0.005s
- ✅ SelectFile_AddsFileToCommittedFilesDictionaryAndInvokesFileSelectionChangedEvent - Passed in 0.004s
- ✅ UnityGit.Tests.Core.Services.CredentialsServiceTests - 6/6 - Passed in 0.021s
- ✅ GetCredentialsForRepository_WithExistingCredentials_ReturnsValidCredentials - Passed in 0.006s
- ✅ GetCredentialsForRepository_WithNoCredentials_ReturnsInvalidCredentials - Passed in 0.003s
- ✅ GetCredentialsHandlerForRepository_ReturnsCredentialsHandlerWithCorrectCredentials - Passed in 0.005s
- ✅ HasCredentialsForRepository_WithExistingCredentials_ReturnsTrue - Passed in 0.003s
- ✅ HasCredentialsForRepository_WithNoCredentials_ReturnsFalse - Passed in 0.002s
- ✅ SetCredentialsForRepository_SetsCredentials - Passed in 0.003s
- ✅ UnityGit.Tests.Core.Services.DiffServiceTests - 3/3 - Passed in 0.047s
- ✅ DiffFile_ShouldWriteBlobContentToFile - Passed in 0.034s
- ✅ DiffFile_WhenBlobExists_ShouldInvokeDiffTool - Passed in 0.008s
- ✅ DiffFile_WhenBlobIsNull_ShouldNotInvokeDiffTool - Passed in 0.004s
- ✅ UnityGit.Tests.Core.Services.GitCommandServiceTests - 8/8 - Passed in 0.065s
- ✅ CreateGitProcess_CreatesAProcessForGitCommand - Passed in 0.010s
- ✅ Run_WhenCommandCanNotBeStarted_ShouldFinishWithErrorMessage - Passed in 0.010s
- ✅ Run_WhenCommandExitsWithNonZeroExitCode_ShouldFinishWithErrorMessage - Passed in 0.007s
- ✅ Run_WhenCommandTimesOut_ShouldFinishWithErrorMessage - Passed in 0.006s
- ✅ Run_WhenExceptionThrown_ShouldLogExceptionAndFinishWithErrorMessage - Passed in 0.013s
- ✅ Run_WhenNotRunning_ShouldRunGitProcess - Passed in 0.007s
- ✅ Run_WhenRunning_ShouldNotRunGitProcess - Passed in 0.006s
- ✅ Run_WhenSuccessful_ShouldLogMessages - Passed in 0.006s
- ✅ UnityGit.Tests.Core.Services.PullServiceTests - 2/2 - Passed in 0.047s
- ✅ Pull_CreatesAMergeResult - Passed in 0.040s
- ✅ Pull_ProvidesCredentials - Passed in 0.007s
- ✅ UnityGit.Tests.Core.Services.PushServiceTests - 2/2 - Passed in 0.016s
- ✅ Push_DoesNotPush_WhenNotConfirmed - Passed in 0.011s
- ✅ Push_Pushes_WhenConfirmed - Passed in 0.004s
- ❌️ UnityGit.Tests.Core.Services.RepositoryServiceTests - 5/9, failed: 4 - Failed in 0.049s
-
✅ AreRepositoriesEqual_ReturnsFalse_IfEitherRepositoryIsNull - Passed in 0.003s
-
❌️ AreRepositoriesEqual_ReturnsWhetherTheRepositoriesAreEqual - Failed in 0.011s
Expected: True
But was: Falseat UnityGit.Tests.Core.Services.RepositoryServiceTests.AreRepositoriesEqual_ReturnsWhetherTheRepositoriesAreEqual () [0x00014] in ./Packages/io.savolainen.unitygit-tests/Core/Services/RepositoryServiceTests.cs:73
-
❌️ GetProjectRepository_ReturnsTheProjectRepository - Failed in 0.014s
Expected: not null
But was: nullat UnityGit.Tests.Core.Services.RepositoryServiceTests.GetProjectRepository_ReturnsTheProjectRepository () [0x00014] in ./Packages/io.savolainen.unitygit-tests/Core/Services/RepositoryServiceTests.cs:20
-
✅ GetProjectRepositoryName_ReturnsTheProjectRepositoryName - Passed in 0.002s
-
✅ GetRepositoryName_ReturnsAFriendlyNameForTheRepository - Passed in 0.005s
-
✅ GetRepositoryOfDirectory_ReturnsNull_IfTheDirectoryDoesNotExist - Passed in 0.002s
-
✅ GetRepositoryOfDirectory_ReturnsNull_IfTheDirectoryIsNotARepository - Passed in 0.003s
-
❌️ IsProjectRepository_ReturnsWhetherTheRepositoryIsTheProjectRepository - Failed in 0.003s
Expected: True
But was: Falseat UnityGit.Tests.Core.Services.RepositoryServiceTests.IsProjectRepository_ReturnsWhetherTheRepositoryIsTheProjectRepository () [0x00014] in ./Packages/io.savolainen.unitygit-tests/Core/Services/RepositoryServiceTests.cs:53
-
❌️ IsValid_ReturnsWhetherTheRepositoryIsValid - Failed in 0.005s
System.NullReferenceException : Object reference not set to an instance of an object
at UnityGit.Core.Services.RepositoryService.IsValid (LibGit2Sharp.IRepository repository) [0x00001] in ./Packages/io.savolainen.unitygit/Core/Services/RepositoryService.cs:123
at UnityGit.Tests.Core.Services.RepositoryServiceTests.IsValid_ReturnsWhetherTheRepositoryIsValid () [0x0004c] in ./Packages/io.savolainen.unitygit-tests/Core/Services/RepositoryServiceTests.cs:122
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <8f02bdf82edc4309b57af878cc7723ff>:0
-
- ✅ UnityGit.Tests.Core.Services.RestoreServiceTests - 12/12 - Passed in 0.059s
- ✅ RestoreFile_IfDeleted_EmitsEvent - Passed in 0.016s
- ✅ RestoreFile_IfFileDoesNotExist_ReturnsFalse - Passed in 0.003s
- ✅ RestoreFile_IfNotConfirmed_ReturnsFalse - Passed in 0.003s
- ✅ RestoreFile_IfRestored_EmitsEvent - Passed in 0.004s
- ✅ TryDeleteFile_IfConfirmed_DeletesFile - Passed in 0.004s
- ✅ TryDeleteFile_IfConfirmed_LogsMessages - Passed in 0.004s
- ✅ TryDeleteFile_IfFailed_LogsException - Passed in 0.007s
- ✅ TryDeleteFile_IfNotConfirmed_ReturnsFalse - Passed in 0.003s
- ✅ TryRestoreFile_IfConfirmed_DeletesFile - Passed in 0.004s
- ✅ TryRestoreFile_IfConfirmed_LogsMessages - Passed in 0.004s
- ✅ TryRestoreFile_IfFailed_LogsException - Passed in 0.004s
- ✅ TryRestoreFile_IfNotConfirmed_ReturnsFalse - Passed in 0.003s
- ✅ UnityGit.Tests.Core.Services.SignatureServiceTests - 4/4 - Passed in 0.054s
- ✅ GetSignature_WhenNoRepositoriesExist_ReturnsNull - Passed in 0.007s
- ✅ GetSignature_WhenNoRepositoryWithSignatureExists_ReturnsNull - Passed in 0.039s
- ✅ GetSignature_WhenPackageRepositoryExists_ReturnsItsSignature - Passed in 0.004s
- ✅ GetSignature_WhenProjectRepositoryExists_ReturnsItsSignature - Passed in 0.003s
- ✅ UnityGit.Tests.Core.Services.StatusServiceTests - 8/8 - Passed in 0.042s
- ✅ Clear_RemovesAndDisposesRepositories - Passed in 0.013s
- ✅ HasPackageRepositories_ReturnsWhetherPackageRepositoriesExist - Passed in 0.003s
- ✅ HasProjectRepository_ReturnsWhetherProjectRepositoryExists - Passed in 0.004s
- ✅ PopulateRepositories_DisposesCurrentProjectRepository - Passed in 0.004s
- ✅ PopulateRepositories_DoesNotAddDuplicatePackageRepositories - Passed in 0.004s
- ✅ PopulateRepositories_PopulatesPackageRepositories - Passed in 0.003s
- ✅ PopulateRepositories_PopulatesProjectRepository - Passed in 0.004s
- ✅ PopulateRepositories_RemovesInvalidPackageRepositories - Passed in 0.006s
- ✅ UnityGit.Tests.Core.Services.UnityGitLogServiceTests - 4/4 - Passed in 0.010s
- ✅ LogError_AddsOutputLineToList - Passed in 0.003s
- ✅ LogException_LogsExceptionDetails - Passed in 0.003s
- ✅ LogMessage_AddsOutputLineToList - Passed in 0.002s
- ✅ LogOutputLine_EmitsOutputReceivedEvent - Passed in 0.002s
Annotations
github-actions / Test Results
UnityGit.Tests.Core.Services.RepositoryServiceTests.AreRepositoriesEqual_ReturnsWhetherTheRepositoriesAreEqual
Expected: True
But was: False
Raw output
at UnityGit.Tests.Core.Services.RepositoryServiceTests.AreRepositoriesEqual_ReturnsWhetherTheRepositoriesAreEqual () [0x00014] in ./Packages/io.savolainen.unitygit-tests/Core/Services/RepositoryServiceTests.cs:73
github-actions / Test Results
UnityGit.Tests.Core.Services.RepositoryServiceTests.GetProjectRepository_ReturnsTheProjectRepository
Expected: not null
But was: null
Raw output
at UnityGit.Tests.Core.Services.RepositoryServiceTests.GetProjectRepository_ReturnsTheProjectRepository () [0x00014] in ./Packages/io.savolainen.unitygit-tests/Core/Services/RepositoryServiceTests.cs:20
github-actions / Test Results
UnityGit.Tests.Core.Services.RepositoryServiceTests.IsProjectRepository_ReturnsWhetherTheRepositoryIsTheProjectRepository
Expected: True
But was: False
Raw output
at UnityGit.Tests.Core.Services.RepositoryServiceTests.IsProjectRepository_ReturnsWhetherTheRepositoryIsTheProjectRepository () [0x00014] in ./Packages/io.savolainen.unitygit-tests/Core/Services/RepositoryServiceTests.cs:53
Check failure on line 123 in ./Packages/io.savolainen.unitygit/Core/Services/RepositoryService.cs
github-actions / Test Results
UnityGit.Tests.Core.Services.RepositoryServiceTests.IsValid_ReturnsWhetherTheRepositoryIsValid
System.NullReferenceException : Object reference not set to an instance of an object
Raw output
at UnityGit.Core.Services.RepositoryService.IsValid (LibGit2Sharp.IRepository repository) [0x00001] in ./Packages/io.savolainen.unitygit/Core/Services/RepositoryService.cs:123
at UnityGit.Tests.Core.Services.RepositoryServiceTests.IsValid_ReturnsWhetherTheRepositoryIsValid () [0x0004c] in ./Packages/io.savolainen.unitygit-tests/Core/Services/RepositoryServiceTests.cs:122
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <8f02bdf82edc4309b57af878cc7723ff>:0