mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 08:11:10 +00:00
Implements directory browser dialog, part 6: hidden file system items toggle
This commit is contained in:
1 parent
cd44f11d9e
commit
debad9ef74
74 files changed
+596
-427
No files matched your search
+6
-5
@@ -1,4 +1,4 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using EntityFrameworkCore.Testing.NSubstitute;
|
||||
using ErrorOr;
|
||||
using FluentAssertions;
|
||||
@@ -10,6 +10,7 @@ using Lumina.DataAccess.Core.UoW;
|
||||
using Lumina.DataAccess.UnitTests.Core.Repositories.Books.Fixtures;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
@@ -58,7 +59,7 @@ public class BookRepositoryTests
|
||||
result.Value.Should().Be(Result.Created);
|
||||
|
||||
// Check if the book was added to the context's ChangeTracker
|
||||
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<BookModel>? addedBook = _mockContext.ChangeTracker.Entries<BookModel>()
|
||||
EntityEntry<BookModel>? addedBook = _mockContext.ChangeTracker.Entries<BookModel>()
|
||||
.FirstOrDefault(e => e.State == EntityState.Added && e.Entity.Id == bookModel.Id);
|
||||
addedBook.Should().NotBeNull();
|
||||
}
|
||||
@@ -99,7 +100,7 @@ public class BookRepositoryTests
|
||||
result.IsError.Should().BeFalse();
|
||||
result.Value.Should().Be(Result.Created);
|
||||
|
||||
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<BookModel>? addedBook = _mockContext.ChangeTracker.Entries<BookModel>()
|
||||
EntityEntry<BookModel>? addedBook = _mockContext.ChangeTracker.Entries<BookModel>()
|
||||
.FirstOrDefault(e => e.State == EntityState.Added && e.Entity.Id == bookModel.Id);
|
||||
addedBook.Should().NotBeNull();
|
||||
BookModel addedBookEntity = addedBook!.Entity;
|
||||
@@ -126,7 +127,7 @@ public class BookRepositoryTests
|
||||
result.IsError.Should().BeFalse();
|
||||
result.Value.Should().Be(Result.Created);
|
||||
|
||||
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<BookModel>? addedBook = _mockContext.ChangeTracker.Entries<BookModel>()
|
||||
EntityEntry<BookModel>? addedBook = _mockContext.ChangeTracker.Entries<BookModel>()
|
||||
.FirstOrDefault(e => e.State == EntityState.Added && e.Entity.Id == bookModel.Id);
|
||||
addedBook.Should().NotBeNull();
|
||||
BookModel addedBookEntity = addedBook!.Entity;
|
||||
@@ -194,4 +195,4 @@ public class BookRepositoryTests
|
||||
retrievedBook.ISBNs.Should().HaveCount(2);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using AutoFixture;
|
||||
using Bogus;
|
||||
using Lumina.Contracts.Enums.BookLibrary;
|
||||
@@ -137,9 +137,9 @@ public class BookModelFixture
|
||||
|
||||
private string CreateGoogleBooksId(Faker f)
|
||||
{
|
||||
const string validChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
||||
return new string(Enumerable.Repeat(validChars, 12)
|
||||
.Select(s => s[f.Random.Number(validChars.Length - 1)])
|
||||
const string VALID_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
||||
return new string(Enumerable.Repeat(VALID_CHARS, 12)
|
||||
.Select(s => s[f.Random.Number(VALID_CHARS.Length - 1)])
|
||||
.ToArray());
|
||||
}
|
||||
|
||||
@@ -205,4 +205,4 @@ public class BookModelFixture
|
||||
));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user