-
-
Notifications
You must be signed in to change notification settings - Fork 158
.NET Core 2.2 -> 3.0 #597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
.NET Core 2.2 -> 3.0 #597
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
24a2ef3
merge: merge into correct email:
wisepotato adf845b
Merge branch 'feat/upgrade-2.2' into feat/upgrade-2.2-real
wisepotato 4124aa9
feat: upgrade to 2.2
wisepotato fb6aa66
chore: merge fixes
wisepotato 17f0c8c
chore: spacing fix
wisepotato 10ea6cb
chore: revert silencing error
wisepotato 0a4e322
chore: small spacing fix
wisepotato 9697449
chore: remove unneeeded dependencies
wisepotato 931c97c
chore: fix framework dependencies
wisepotato dd37d8e
chore: updates
wisepotato aaa7655
merge: merge from dev-v4
wisepotato 13bfdeb
chore: test fixes
wisepotato 5b10565
chore: start integration tests
wisepotato 487728e
chore: cleanup name of dertest
wisepotato 80ea141
chore: start of getRepostory
wisepotato 754e2e3
chore: upgrade testsdk version + xunit version
wisepotato 19349ae
feat: use template in version control of packages in integrationTests
wisepotato 7617445
feat: unit test assemblyinfo add, port old test to integration (attri…
wisepotato bc5c1df
docs: add version compatibility
wisepotato 70dd35d
chore: add asterisk for version number
wisepotato 9f11631
feat: port defaultentityrepositorytests to integration tests
wisepotato 67dd3eb
chore: should add logging, done.
wisepotato 15a9402
tests: bad response from tests
wisepotato 153f9cb
chore: fixes for lang version and making ifs more noticable
wisepotato 9e6c36b
fix: fix routing issue with upgrade to enableendpointrouting
wisepotato bf72324
chore: HostEnvironment -> IWebHostEnvironment
wisepotato 07840c4
chore: act -> Act, assert -> Assert, arrange -> Arrange
wisepotato 9ee71f5
chore: fix tests
wisepotato 9000421
chore: re-add unit test for defaultentityrepository for test IAsyncQu…
wisepotato 2843111
refactor: make if statements more conscise
wisepotato d6f763f
chore: final stretch
wisepotato 98b1119
tests: revert for good tests
wisepotato cd7e19c
Revert "tests: revert for good tests"
maurei 90ebfca
Revert "chore: final stretch"
maurei 5f7d330
fix: client generated id tests
maurei f149bc9
fix: create data tests with workaround for efcore 3.0 bug
maurei f8e9523
refactor: DetachRelationships usage of is operator
maurei 9ff0709
fix: move MetaStartup to other assembly as .net core 3 bug workaround
maurei 9b2ecdf
fix: UpdatingRelationshipTests locally evaluated queries error
maurei 57c5da1
feat: reintroduced generic processor (RepositoryRelationshipUpdateHel…
maurei 7faa500
feat: full sql support for UpdateRelationshipsAsync using expression …
maurei 73f43e9
fix: DeletingDataTest
maurei fe67998
fix: paging test
maurei 82005ec
fix: paging unit tests
maurei 4a3296e
chore: remove RE-split models, duplicate models to NoEntityFrameworkE…
maurei e83abfd
fix: NoEntityFrameworkExample tests fixed by workaround assembly problem
maurei a81b6ac
fix: connection string e2e test projects
maurei 518e4d0
chore: minor cleanup
maurei 7845250
chore: minor cleanup
maurei 6e8ddf4
chore: cleanup
maurei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
using JsonApiDotNetCore.Builders; | ||
using JsonApiDotNetCore.Data; | ||
using JsonApiDotNetCore.Internal.Contracts; | ||
using JsonApiDotNetCore.Serialization; | ||
using JsonApiDotNetCoreExample.Data; | ||
using JsonApiDotNetCoreExample.Models; | ||
using Microsoft.EntityFrameworkCore; | ||
using Moq; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace UnitTests.Data | ||
{ | ||
public class DefaultEntityRepositoryTest | ||
{ | ||
|
||
[Fact] | ||
public async Task PageAsync_IQueryableIsAListAndPageNumberPositive_CanStillCount() | ||
{ | ||
// If IQueryable is actually a list (this can happen after a filter or hook) | ||
// It needs to not do CountAsync, because well.. its not asynchronous. | ||
|
||
// Arrange | ||
var repository = Setup(); | ||
var todoItems = new List<TodoItem>() { | ||
new TodoItem{ Id = 1 }, | ||
new TodoItem{ Id = 2 } | ||
}; | ||
|
||
// Act | ||
var result = await repository.PageAsync(todoItems.AsQueryable(), pageSize: 1, pageNumber: 2); | ||
|
||
// Assert | ||
Assert.True(result.ElementAt(0).Id == todoItems[1].Id); | ||
} | ||
|
||
[Fact] | ||
public async Task PageAsync_IQueryableIsAListAndPageNumberNegative_CanStillCount() | ||
{ | ||
// If IQueryable is actually a list (this can happen after a filter or hook) | ||
// It needs to not do CountAsync, because well.. its not asynchronous. | ||
|
||
// Arrange | ||
var repository = Setup(); | ||
var todoItems = new List<TodoItem>() { | ||
new TodoItem{ Id = 1 }, | ||
new TodoItem{ Id = 2 }, | ||
new TodoItem{ Id = 3 }, | ||
new TodoItem{ Id = 4 } | ||
}; | ||
|
||
// Act | ||
var result = await repository.PageAsync(todoItems.AsQueryable(), pageSize: 1, pageNumber: -2); | ||
|
||
// Assert | ||
Assert.True(result.First().Id == 3); | ||
} | ||
|
||
private DefaultResourceRepository<TodoItem> Setup() | ||
{ | ||
var contextResolverMock = new Mock<IDbContextResolver>(); | ||
contextResolverMock.Setup(m => m.GetContext()).Returns(new Mock<DbContext>().Object); | ||
var resourceGraph = new Mock<IResourceGraph>(); | ||
var targetedFields = new Mock<ITargetedFields>(); | ||
var repository = new DefaultResourceRepository<TodoItem>(targetedFields.Object, contextResolverMock.Object, resourceGraph.Object, null); | ||
return repository; | ||
} | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because why not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really appreciate your work. Thank you all.