test: add tests for the majority of the Core assembly #7
❌️ Test Results - 106/110, failed: 4 - Failed in 1.058s
❌️ editmode-results.xml - 106/110, failed: 4 - Failed in 1.058s
Details
❌️ editmode-results.xml - 106/110, failed: 4 - Failed in 1.058s
- ✅ UnityGit.Tests.Core.Data.CredentialsTests.IsValid_ReturnsWhetherCredentialsAreValid - 4/4 - Passed in 0.019s
- ✅ IsValid_ReturnsWhetherCredentialsAreValid("","",False) - Passed in 0.018s
- ✅ IsValid_ReturnsWhetherCredentialsAreValid("name","",False) - Passed in 0.000s
- ✅ IsValid_ReturnsWhetherCredentialsAreValid("","password123",False) - Passed in 0.000s
- ✅ IsValid_ReturnsWhetherCredentialsAreValid("name","password123",True) - Passed in 0.000s
- ✅ UnityGit.Tests.Core.Data.GitCommandInfoTests - 1/1 - Passed in 0.001s
- ✅ It_Should_Return_Proper_String_Representation - Passed in 0.001s
- ✅ UnityGit.Tests.Core.FileStatusUtilitiesTests - 17/17 - Passed in 0.148s
- ✅ Exists_ReturnsFalse_WhenEntryHasNonexistentOrDeletedFlags - Passed in 0.142s
- ✅ Exists_ReturnsFalse_WhenStatusHasDeletedFlags - Passed in 0.000s
- ✅ Exists_ReturnsFalse_WhenStatusHasNonexistentFlag - Passed in 0.000s
- ✅ Exists_ReturnsTrue_WhenEntryDoesNotExistFlagsAreNotSet - Passed in 0.001s
- ✅ Exists_ReturnsTrue_WhenStatusDoesNotExistFlagsAreNotSet - Passed in 0.000s
- ✅ IsDeleted_ReturnsFalse_WhenStatusDoesNotHaveDeletedFlags - Passed in 0.000s
- ✅ IsDeleted_ReturnsTrue_WhenStatusHasDeletedFlags - Passed in 0.000s
- ✅ IsModified_ReturnsFalse_WhenEntryDoesNotHaveModifiedFlags - Passed in 0.001s
- ✅ IsModified_ReturnsFalse_WhenStatusDoesNotHaveModifiedFlags - Passed in 0.000s
- ✅ IsModified_ReturnsTrue_WhenEntryHasModifiedFlags - Passed in 0.000s
- ✅ IsModified_ReturnsTrue_WhenStatusHasModifiedFlags - Passed in 0.000s
- ✅ IsNew_ReturnsFalse_WhenEntryDoesNotHaveNewFlags - Passed in 0.001s
- ✅ IsNew_ReturnsFalse_WhenStatusDoesNotHaveNewFlags - Passed in 0.000s
- ✅ IsNew_ReturnsTrue_WhenEntryHasNewFlags - Passed in 0.001s
- ✅ IsNew_ReturnsTrue_WhenStatusHasNewFlags - Passed in 0.000s
- ✅ IsRenamed_ReturnsFalse_WhenStatusDoesNotHaveRenamedFlags - Passed in 0.000s
- ✅ IsRenamed_ReturnsTrue_WhenStatusHasRenamedFlags - Passed in 0.000s
- ✅ UnityGit.Tests.Core.GitProcessTests - 4/4 - Passed in 0.259s
- ✅ It_Outputs_Error_Lines - Passed in 0.062s
- ✅ It_Runs_The_Git_Command - Passed in 0.145s
- ✅ It_Should_Return_Proper_String_Representation - Passed in 0.001s
- ✅ It_Times_Out_After_Given_Milliseconds - Passed in 0.051s
- ✅ UnityGit.Tests.Core.Services.BranchServiceTests - 7/7 - Passed in 0.068s
- ✅ GetBranchName_ReturnsBranchFriendlyName - Passed in 0.034s
- ✅ IsAheadOfRemote_ReturnsFalse_WhenBranchDoesNotExist - Passed in 0.023s
- ✅ IsAheadOfRemote_ReturnsFalse_WhenBranchIsNotAheadOfRemote - Passed in 0.001s
- ✅ IsAheadOfRemote_ReturnsTrue_WhenBranchIsAheadOfRemote - Passed in 0.001s
- ✅ IsBehindRemote_ReturnsFalse_WhenBranchDoesNotExist - Passed in 0.002s
- ✅ IsBehindRemote_ReturnsFalse_WhenBranchIsNotBehindRemote - Passed in 0.001s
- ✅ IsBehindRemote_ReturnsTrue_WhenBranchIsBehindRemote - Passed in 0.006s
- ✅ UnityGit.Tests.Core.Services.CheckoutServiceTests - 5/5 - Passed in 0.094s
- ✅ CheckoutBranch_ChecksOutBranch - Passed in 0.083s
- ✅ CheckoutBranch_LogsCheckedOutBranchMessage - Passed in 0.002s
- ✅ CheckoutBranch_LogsCheckoutMessage - Passed in 0.002s
- ✅ CheckoutBranch_LogsExceptionIfCheckoutFails - Passed in 0.003s
- ✅ ForceCheckoutPaths_CallsCheckoutPathsOnRepository - Passed in 0.005s
- ✅ UnityGit.Tests.Core.Services.CommitServiceTests - 14/14 - Passed in 0.032s
- ✅ CommitSelected_CallsStageAndFileSelectionChangedForEachSelectedFileInRepositories - Passed in 0.011s
- ✅ CommitSelected_ClearsCommittedFilesDictionary - Passed in 0.001s
- ✅ CommitSelected_Creates_A_Commit - Passed in 0.002s
- ✅ CommitSelected_Creates_Progress_Indicator - Passed in 0.002s
- ✅ CommitSelected_Invokes_CommitCreated_Event - Passed in 0.002s
- ✅ CommitSelected_Stages_EachSelectedFile - Passed in 0.002s
- ✅ DeselectFile_DoesNotRemoveFileIfRepositoryDoesNotExistInCommittedFilesDictionary - Passed in 0.001s
- ✅ DeselectFile_RemovesFileFromCommittedFilesDictionaryAndInvokesFileSelectionChangedEvent - Passed in 0.001s
- ✅ GetSelectedCount_ReturnsCorrectCount_WhenFilesAreSelected - Passed in 0.001s
- ✅ GetSelectedCount_ReturnsZero_WhenFilesAreSelectedThenDeselected - Passed in 0.001s
- ✅ GetSelectedCount_ReturnsZero_WhenNoFilesAreSelected - Passed in 0.001s
- ✅ Reports_Error_When_Committing_Empty_Commit - Passed in 0.003s
- ✅ Reports_Exceptions - Passed in 0.002s
- ✅ SelectFile_AddsFileToCommittedFilesDictionaryAndInvokesFileSelectionChangedEvent - Passed in 0.001s
- ✅ UnityGit.Tests.Core.Services.CredentialsServiceTests - 6/6 - Passed in 0.008s
- ✅ GetCredentialsForRepository_WithExistingCredentials_ReturnsValidCredentials - Passed in 0.003s
- ✅ GetCredentialsForRepository_WithNoCredentials_ReturnsInvalidCredentials - Passed in 0.001s
- ✅ GetCredentialsHandlerForRepository_ReturnsCredentialsHandlerWithCorrectCredentials - Passed in 0.003s
- ✅ HasCredentialsForRepository_WithExistingCredentials_ReturnsTrue - Passed in 0.001s
- ✅ HasCredentialsForRepository_WithNoCredentials_ReturnsFalse - Passed in 0.001s
- ✅ SetCredentialsForRepository_SetsCredentials - Passed in 0.001s
- ✅ UnityGit.Tests.Core.Services.DiffServiceTests - 3/3 - Passed in 0.032s
- ✅ DiffFile_ShouldWriteBlobContentToFile - Passed in 0.025s
- ✅ DiffFile_WhenBlobExists_ShouldInvokeDiffTool - Passed in 0.005s
- ✅ DiffFile_WhenBlobIsNull_ShouldNotInvokeDiffTool - Passed in 0.002s
- ✅ UnityGit.Tests.Core.Services.GitCommandServiceTests - 8/8 - Passed in 0.064s
- ✅ CreateGitProcess_CreatesAProcessForGitCommand - Passed in 0.006s
- ✅ Run_WhenCommandCanNotBeStarted_ShouldFinishWithErrorMessage - Passed in 0.010s
- ✅ Run_WhenCommandExitsWithNonZeroExitCode_ShouldFinishWithErrorMessage - Passed in 0.006s
- ✅ Run_WhenCommandTimesOut_ShouldFinishWithErrorMessage - Passed in 0.006s
- ✅ Run_WhenExceptionThrown_ShouldLogExceptionAndFinishWithErrorMessage - Passed in 0.008s
- ✅ Run_WhenNotRunning_ShouldRunGitProcess - Passed in 0.007s
- ✅ Run_WhenRunning_ShouldNotRunGitProcess - Passed in 0.006s
- ✅ Run_WhenSuccessful_ShouldLogMessages - Passed in 0.014s
- ✅ UnityGit.Tests.Core.Services.PullServiceTests - 2/2 - Passed in 0.039s
- ✅ Pull_CreatesAMergeResult - Passed in 0.034s
- ✅ Pull_ProvidesCredentials - Passed in 0.005s
- ✅ UnityGit.Tests.Core.Services.PushServiceTests - 2/2 - Passed in 0.010s
- ✅ Push_DoesNotPush_WhenNotConfirmed - Passed in 0.008s
- ✅ Push_Pushes_WhenConfirmed - Passed in 0.002s
- ❌️ UnityGit.Tests.Core.Services.RepositoryServiceTests - 5/9, failed: 4 - Failed in 0.020s
-
✅ AreRepositoriesEqual_ReturnsFalse_IfEitherRepositoryIsNull - Passed in 0.001s
-
❌️ AreRepositoriesEqual_ReturnsWhetherTheRepositoriesAreEqual - Failed in 0.007s
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.004s
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.000s
-
✅ GetRepositoryName_ReturnsAFriendlyNameForTheRepository - Passed in 0.002s
-
✅ GetRepositoryOfDirectory_ReturnsNull_IfTheDirectoryDoesNotExist - Passed in 0.000s
-
✅ GetRepositoryOfDirectory_ReturnsNull_IfTheDirectoryIsNotARepository - Passed in 0.001s
-
❌️ IsProjectRepository_ReturnsWhetherTheRepositoryIsTheProjectRepository - Failed in 0.001s
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.003s
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 <131fc96242a743e6b00bc8a8663638a3>:0
-
- ✅ UnityGit.Tests.Core.Services.RestoreServiceTests - 12/12 - Passed in 0.027s
- ✅ RestoreFile_IfDeleted_EmitsEvent - Passed in 0.008s
- ✅ RestoreFile_IfFileDoesNotExist_ReturnsFalse - Passed in 0.001s
- ✅ RestoreFile_IfNotConfirmed_ReturnsFalse - Passed in 0.001s
- ✅ RestoreFile_IfRestored_EmitsEvent - Passed in 0.002s
- ✅ TryDeleteFile_IfConfirmed_DeletesFile - Passed in 0.002s
- ✅ TryDeleteFile_IfConfirmed_LogsMessages - Passed in 0.001s
- ✅ TryDeleteFile_IfFailed_LogsException - Passed in 0.004s
- ✅ TryDeleteFile_IfNotConfirmed_ReturnsFalse - Passed in 0.001s
- ✅ TryRestoreFile_IfConfirmed_DeletesFile - Passed in 0.002s
- ✅ TryRestoreFile_IfConfirmed_LogsMessages - Passed in 0.002s
- ✅ TryRestoreFile_IfFailed_LogsException - Passed in 0.002s
- ✅ TryRestoreFile_IfNotConfirmed_ReturnsFalse - Passed in 0.001s
- ✅ UnityGit.Tests.Core.Services.SignatureServiceTests - 4/4 - Passed in 0.041s
- ✅ GetSignature_WhenNoRepositoriesExist_ReturnsNull - Passed in 0.006s
- ✅ GetSignature_WhenNoRepositoryWithSignatureExists_ReturnsNull - Passed in 0.032s
- ✅ GetSignature_WhenPackageRepositoryExists_ReturnsItsSignature - Passed in 0.002s
- ✅ GetSignature_WhenProjectRepositoryExists_ReturnsItsSignature - Passed in 0.001s
- ✅ UnityGit.Tests.Core.Services.StatusServiceTests - 8/8 - Passed in 0.021s
- ✅ Clear_RemovesAndDisposesRepositories - Passed in 0.008s
- ✅ HasPackageRepositories_ReturnsWhetherPackageRepositoriesExist - Passed in 0.001s
- ✅ HasProjectRepository_ReturnsWhetherProjectRepositoryExists - Passed in 0.001s
- ✅ PopulateRepositories_DisposesCurrentProjectRepository - Passed in 0.001s
- ✅ PopulateRepositories_DoesNotAddDuplicatePackageRepositories - Passed in 0.002s
- ✅ PopulateRepositories_PopulatesPackageRepositories - Passed in 0.001s
- ✅ PopulateRepositories_PopulatesProjectRepository - Passed in 0.005s
- ✅ PopulateRepositories_RemovesInvalidPackageRepositories - Passed in 0.001s
- ✅ UnityGit.Tests.Core.Services.UnityGitLogServiceTests - 4/4 - Passed in 0.012s
- ✅ LogError_AddsOutputLineToList - Passed in 0.001s
- ✅ LogException_LogsExceptionDetails - Passed in 0.010s
- ✅ LogMessage_AddsOutputLineToList - Passed in 0.001s
- ✅ LogOutputLine_EmitsOutputReceivedEvent - Passed in 0.001s
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 /github/workspace/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 /github/workspace/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 /github/workspace/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 /github/workspace/Packages/io.savolainen.unitygit/Core/Services/RepositoryService.cs:123
at UnityGit.Tests.Core.Services.RepositoryServiceTests.IsValid_ReturnsWhetherTheRepositoryIsValid () [0x0004c] in /github/workspace/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 <131fc96242a743e6b00bc8a8663638a3>:0