-
Notifications
You must be signed in to change notification settings - Fork 21
Assignment7+8 linq #91
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
base: Assignment7+8-LINQ
Are you sure you want to change the base?
Assignment7+8 linq #91
Conversation
katmilton
left a comment
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.
Implement the ISampleData.CsvRows property, loading the data from the People.csv file and returning each line as a single string. ✔
Change the "Copy to" property on People.csv to "Copy if newer" so that the file is deployed along with your test project. ✔
Using LINQ, skip the first row in the People.csv. ✔
Be sure to appropriately handle resource (IDisposable) items correctly if applicable (and it may not be depending on how you implement it). ✔
Implement IEnumerable GetUniqueSortedListOfStatesGivenCsvRows() to return a sorted, unique list of states. ✔
Use ISampleData.CsvRows for your data source. ✔
Don't forget the list should be unique. ✔
Sort the list alphabetically. ✔
Include a test that leverages a hardcoded list of addresses. ✔
Include a test that uses LINQ to verify the data is sorted correctly (do not use a hardcoded list). ✔
Implement ISampleData.GetAggregateSortedListOfStatesUsingCsvRows() to return a string that contains a unique, comma separated list of states. ✔
Use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows() for your data source. ✔
Consider "selecting" only the states and calling ToArray() to retrieve an array of all the state names. ✔
Given the array, consider using string.Join to combine the list into a single string. ✔
Implement the ISampleData.People property to return all the items in People.csv as Person objects ✔
Use ISampleData.CsvRows as the source of the data. ✔
Sort the list by State, City, and Zip. ✔
Be sure that Person.Address is also populated. ✔
Adding null validation to all the Person and Address properties is optional.
Consider using ISampleData.CsvRows in your test to verify your results. ✔
Implement ISampleDate.FilterByEmailAddress(Predicate filter) to return a list of names where the email address matches the filter. ✔
Use ISampleData.People for your data source. ✔
Implement ISampleData.GetAggregateListOfStatesGivenPeopleCollection(IEnumerable people) to return a string that contains a unique, comma-separated list of states. ✔
Use the people parameter from ISampleData.People property for your data source. ✔
At a minimum, use the System.Linq.Enumerable.Aggregate` LINQ method to create your result. ✔
Don't forget the list should be unique. ✔
It is recommended that, at a minimum, you use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows to validate your result.
Given the implementation of Node in Assignment5
Implement IEnumerable to return all the items in the "circle" of items. ✔
Add an IEnumberable ChildItems(int maximum) method to Node that returns the remaining items with a maximum number of items returned less than maximum.
Extra Credit
Implement the homework using async/await and multi-threading by defining a new SampleDataAsync class that implements IAsyncSampleData). Refactor your SampleData and SampleDataAsync classes with minimal duplication. Be sure to refactor your tests to re-use a significant amount of the test code for both implementations. ✔
Fundamentals
Place all shared project properties into a Directory.Build.Props file.
Place all shared project items into a Directory.Build.targets file.
Ensure nullable reference types is enabled ✔
Ensure that you turn on code analysis for all projects(EnableNETAnalyzers) ✔
Set LangVersion and the TargetFramework to the latest released versions available (preview versions optional) ✔
and enabled .NET analyzers for both projects ✔
For this assignment, consider using Assert.AreEqual() (the generic version) ✔
All of the above should be unit tested ✔
Choose simplicity over complexity ✔
Nice work!
Al3xramirez
left a comment
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.
Implement the ISampleData.CsvRows property, loading the data from the People.csv file and returning each line as a single string. ✔
Change the "Copy to" property on People.csv to "Copy if newer" so that the file is deployed along with your test project. ✔
Using LINQ, skip the first row in the People.csv. ✔
Be sure to appropriately handle resource (IDisposable) items correctly if applicable (and it may not be depending on how you implement it). ✔
Implement IEnumerable GetUniqueSortedListOfStatesGivenCsvRows() to return a sorted, unique list of states. ✔
Use ISampleData.CsvRows for your data source. ✔
Don't forget the list should be unique. ✔
Sort the list alphabetically. ✔
Include a test that leverages a hardcoded list of addresses. ✔
Include a test that uses LINQ to verify the data is sorted correctly (do not use a hardcoded list). ✔
Implement ISampleData.GetAggregateSortedListOfStatesUsingCsvRows() to return a string that contains a unique, comma separated list of states. ✔
Use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows() for your data source. ✔
Consider "selecting" only the states and calling ToArray() to retrieve an array of all the state names. ✔
Given the array, consider using string.Join to combine the list into a single string. ✔
Implement the ISampleData.People property to return all the items in People.csv as Person objects ✔
Use ISampleData.CsvRows as the source of the data. ✔
Sort the list by State, City, and Zip. ✔
Be sure that Person.Address is also populated. ✔
Adding null validation to all the Person and Address properties is optional.
Consider using ISampleData.CsvRows in your test to verify your results. ✔
Implement ISampleDate.FilterByEmailAddress(Predicate filter) to return a list of names where the email address matches the filter. ✔
Use ISampleData.People for your data source. ✔
Implement ISampleData.GetAggregateListOfStatesGivenPeopleCollection(IEnumerable people) to return a string that contains a unique, comma-separated list of states. ✔
Use the people parameter from ISampleData.People property for your data source. ✔
At a minimum, use the System.Linq.Enumerable.Aggregate` LINQ method to create your result. ✔
Don't forget the list should be unique. ✔
It is recommended that, at a minimum, you use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows to validate your result.
Given the implementation of Node in Assignment5
Implement IEnumerable to return all the items in the "circle" of items. ✔
Add an IEnumberable ChildItems(int maximum) method to Node that returns the remaining items with a maximum number of items returned less than maximum.
Fundamentals
Place all shared project properties into a Directory.Build.Props file. ✔
Place all shared project items into a Directory.Build.targets file. ❌
Ensure nullable reference types is enabled ✔
Ensure that you turn on code analysis for all projects(EnableNETAnalyzers) ✔
Set LangVersion and the TargetFramework to the latest released versions available (preview versions optional) ✔
and enabled .NET analyzers for both projects ✔
For this assignment, consider using Assert.AreEqual() (the generic version) ❌
All of the above should be unit tested ✔
Choose simplicity over complexity ✔
Great work, love your unit testing!
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.
Implement the ISampleData.CsvRows property, loading the data from the People.csv file and returning each line as a single string. ✔
Change the "Copy to" property on People.csv to "Copy if newer" so that the file is deployed along with your test project. ✔
Using LINQ, skip the first row in the People.csv. ✔
Be sure to appropriately handle resource (IDisposable) items correctly if applicable (and it may not be depending on how you implement it). ✔
Implement IEnumerable GetUniqueSortedListOfStatesGivenCsvRows() to return a sorted, unique list of states. ✔
Use ISampleData.CsvRows for your data source. ✔
Don't forget the list should be unique. ✔
Sort the list alphabetically. ✔
Include a test that leverages a hardcoded list of addresses. ✔
Include a test that uses LINQ to verify the data is sorted correctly (do not use a hardcoded list). ✔
Implement ISampleData.GetAggregateSortedListOfStatesUsingCsvRows() to return a string that contains a unique, comma separated list of states. ✔
Use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows() for your data source. ✔
Consider "selecting" only the states and calling ToArray() to retrieve an array of all the state names. ✔
Given the array, consider using string.Join to combine the list into a single string. ✔
Implement the ISampleData.People property to return all the items in People.csv as Person objects ✔
Use ISampleData.CsvRows as the source of the data. ✔
Sort the list by State, City, and Zip. ✔
Be sure that Person.Address is also populated. ✔
Adding null validation to all the Person and Address properties is optional.
Consider using ISampleData.CsvRows in your test to verify your results. ✔
Implement ISampleDate.FilterByEmailAddress(Predicate filter) to return a list of names where the email address matches the filter. ✔
Use ISampleData.People for your data source. ✔
Implement ISampleData.GetAggregateListOfStatesGivenPeopleCollection(IEnumerable people) to return a string that contains a unique, comma-separated list of states. ✔
Use the people parameter from ISampleData.People property for your data source. ✔
At a minimum, use the System.Linq.Enumerable.Aggregate` LINQ method to create your result. ✔
Don't forget the list should be unique. ✔
It is recommended that, at a minimum, you use ISampleData.GetUniqueSortedListOfStatesGivenCsvRows to validate your result.
Given the implementation of Node in Assignment5
Implement IEnumerable to return all the items in the "circle" of items. ✔
Add an IEnumberable ChildItems(int maximum) method to Node that returns the remaining items with a maximum number of items returned less than maximum.
Extra credit not done.
Place all shared project properties into a Directory.Build.Props file.
Place all shared project items into a Directory.Build.targets file.
Ensure nullable reference types is enabled ✔
Ensure that you turn on code analysis for all projects(EnableNETAnalyzers) ✔
Set LangVersion and the TargetFramework to the latest released versions available (preview versions optional) ✔
and enabled .NET analyzers for both projects ✔
For this assignment, consider using Assert.AreEqual() (the generic version) ❌
All of the above should be unit tested ✔
Choose simplicity over complexity ✔
Great job just some nitpicks with csproj files.
Nice job overall |
c13200e to
cf001c4
Compare
SummarySummary
CoverageAssignment - 91.8%
|
Joshua-Lester3
left a comment
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.
Instructions
Throughout, consider using the System.Linq.Enumerable methods Zip, Count, Sort and Contains methods for testing collections.. (Preferably avoid using Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert although that might be easier, to get a firmer grasp on additional LINQ API.)
-
Implement the
ISampleData.CsvRowsproperty, loading the data from thePeople.csvfile and returning each line as a single string. ✔- Change the "Copy to" property on People.csv to "Copy if newer" so that the file is deployed along with your test project. ✔
- Using LINQ, skip the first row in the
People.csv. ✔ - Be sure to appropriately handle resource (
IDisposable) items correctly if applicable (and it may not be depending on how you implement it). ✔
-
Implement
IEnumerable<string> GetUniqueSortedListOfStatesGivenCsvRows()to return a sorted, unique list of states. ✔- Use
ISampleData.CsvRowsfor your data source. ✔ - Don't forget the list should be unique. ✔
- Sort the list alphabetically. ✔
- Include a test that leverages a hardcoded list of addresses. ✔
- Include a test that uses LINQ to verify the data is sorted correctly (do not use a hardcoded list). ✔
- Use
-
Implement
ISampleData.GetAggregateSortedListOfStatesUsingCsvRows()to return astringthat contains a unique, comma separated list of states. ✔- Use
ISampleData.GetUniqueSortedListOfStatesGivenCsvRows()for your data source. ✔ - Consider "selecting" only the states and calling
ToArray()to retrieve an array of all the state names. ✔ - Given the array, consider using
string.Jointo combine the list into a single string. ✔
- Use
-
Implement the
ISampleData.Peopleproperty to return all the items inPeople.csvasPersonobjects ✔- Use
ISampleData.CsvRowsas the source of the data. ✔ - Sort the list by State, City, and Zip. ✔
- Be sure that
Person.Addressis also populated. ✔ - Adding null validation to all the
PersonandAddressproperties is optional. - Consider using
ISampleData.CsvRowsin your test to verify your results. ✔
- Use
-
Implement
ISampleDate.FilterByEmailAddress(Predicate<string> filter)to return a list of names where the email address matches thefilter. ✔- Use
ISampleData.Peoplefor your data source. ✔
- Use
-
Implement
ISampleData.GetAggregateListOfStatesGivenPeopleCollection(IEnumerable<IPerson> people)to return astringthat contains a unique, comma-separated list of states. ✔- Use the
peopleparameter fromISampleData.Peopleproperty for your data source. ✔ - At a minimum, use the
System.Linq.Enumerable.Aggregate` LINQ method to create your result. ✔ - Don't forget the list should be unique. ✔
- It is recommended that, at a minimum, you use
ISampleData.GetUniqueSortedListOfStatesGivenCsvRowsto validate your result.
- Use the
-
Given the implementation of
Nodein Assignment5
- Implement
IEnumerable<T>to return all the items in the "circle" of items. ✔ - Add an
IEnumberable<T> ChildItems(int maximum)method toNodethat returns the remaining items with a maximum number of items returned less thanmaximum.
Extra Credit
- Implement the homework using async/await and multi-threading by defining a new
SampleDataAsyncclass that implementsIAsyncSampleData). Refactor yourSampleDataandSampleDataAsyncclasses with minimal duplication. Be sure to refactor your tests to re-use a significant amount of the test code for both implementations. ❌ not implemented
Fundamentals
- Place all shared project properties into a
Directory.Build.Propsfile. - Place all shared project items into a
Directory.Build.targetsfile. - Ensure nullable reference types is enabled ✔
- Ensure that you turn on code analysis for all projects(EnableNETAnalyzers) ✔
- Set
LangVersionand theTargetFrameworkto the latest released versions available (preview versions optional) ✔ - and enabled .NET analyzers for both projects ✔
- For this assignment, consider using
Assert.AreEqual<T>()(the generic version) ✔ - All of the above should be unit tested ✔
- Choose simplicity over complexity ✔
Worked on with @KorbinWeiler