-
Notifications
You must be signed in to change notification settings - Fork 167
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
Cleanup unit tests to remove ToList #369
Comments
This is RC because it's actually an auditing activity for bits of LINQ syntax. It changes our tests to be testing more Linq. |
AndyDentFree
added a commit
that referenced
this issue
Mar 4, 2016
#361 Add LINQ Count(Expression) remove ToList and use straight All<...>()>Count() - ObjectIntegrationTests.cs - SimpleTest - CreateObjectTest remove ToList and use All<...>.Where(...).Count() SimpelLINQtests.cs - CreateList replace All<...>.Where(...).Count() with All<...>.Count(...) SimpleLINQtests.cs - CountFoundItems - CountWithNot replace realm.All<...>().Where( ...).ToList().First() with .All<...>().First(...) - RelationshipTests.cs - TimHasATopDog - TimHasTwoIterableDogs - TimHasTwoIterableDogsListed - TimsIterableDogsThrowExceptions - TimRetiredHisTopDog - TimAddsADogLater - DaniHasNoTopDog replace realm.All<...>().Where( ...).ToList().First() with .All<...>().Single(...) - RelationshipTests.cs - TimAddsADogByInsert - TimLosesHisDogsByOrder - TimLosesHisDogsInOneClear - TimLosesBilbo - TestExceptionsFromTimsDogsOutOfRange replace realm.All<...>().Where( ...).ToList()[0] with .All<...>().First(...) - ObjectIntegrationTests.cs - ReadAndWriteEqualityTest replace realm.All<...>().Where( ...).ToList().First() with .All<...>().Where(...).First() - RelationshipTests.cs - DaniHasNoTopDog - TestExceptionsFromEmptyListOutOfRange replace realm.All<...>().Where( ...).ToList().First() with .All<...>().Where(...).First() - RelationshipTests.cs - DaniHasNoDogs - TestExceptionsFromIteratingEmptyList replace realm.All<...>().Where( ...).ToList().Count with .All<...>().Count(...) - TestManagingStandaloneThreeLevelRelationship - TestCircularRelationshipsFromStandaloneTwoStage RealmResultsVisitor.cs - RecurseToWhereOrRunLambda added - VisitMethodCall - handle Count, Single and First with no lambda argument, using RecurseToWhereOrRunLambda TODO NonAutomaticPropertiesShouldBeIgnored _realm.All<Person>().ToList().Single() to straight _realm.All<Person>().Single()
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Before we had
Count
working onAll
andWhere
it was necessary to useToList
for our assertions. That can now be removed, which will cleanup and speedup our unit testsThe text was updated successfully, but these errors were encountered: