tag:blogger.com,1999:blog-5359546512544809971.post1146222237199767887..comments2024-03-22T10:42:37.237-07:00Comments on Jeremy Bytes: Smart Unit Tests (Preview) and Conway's Game of LifeJeremyhttp://www.blogger.com/profile/06749690234470413216noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-5359546512544809971.post-82535586470608589742014-12-16T11:10:45.377-08:002014-12-16T11:10:45.377-08:00>> Now, I wish that this had generated at le...>> Now, I wish that this had generated at least one more test with the parameters "Alive" and "4".<br />This is reasonable. Will look into this. Thank you.pvlakshmhttps://www.blogger.com/profile/17372012737878728164noreply@blogger.comtag:blogger.com,1999:blog-5359546512544809971.post-30078120356611919832014-11-14T18:02:28.188-08:002014-11-14T18:02:28.188-08:00It does allow you to create custom factories, so i...It does allow you to create custom factories, so if you're using constructor injection, you can modify the factory method for the dependent objects with the code that you want to use for testing. There's a short demo of this on Channel 9: http://channel9.msdn.com/Events/Visual-Studio/Connect-event-2014/215<br /><br />I don't believe it goes much beyond this (at this point), but we'll see what the future holds.Jeremyhttps://www.blogger.com/profile/06749690234470413216noreply@blogger.comtag:blogger.com,1999:blog-5359546512544809971.post-48121135009625353052014-11-14T17:52:42.571-08:002014-11-14T17:52:42.571-08:00It actually goes back to the original article (htt...It actually goes back to the original article (http://jeremybytes.blogspot.com/2014/10/tdd-conways-game-of-life.html). The rules are "less than 2 dies from loneliness" and "more than 3 dies from overcrowding". So a value of 2 or 3 remains unchanged.Jeremyhttps://www.blogger.com/profile/06749690234470413216noreply@blogger.comtag:blogger.com,1999:blog-5359546512544809971.post-10873264914287561522014-11-14T16:55:50.554-08:002014-11-14T16:55:50.554-08:00Just curious, but why is
if (liveNeighbors < ...Just curious, but why is <br /><br />if (liveNeighbors < 2 or liveNeighbors > 3)<br /><br />better than?<br /><br />if (liveNeighbors != 3)<br /><br />am I missing something obvious? Or is optimization so 80s and 90s?<br />Joviexhttps://www.blogger.com/profile/14318473471062567576noreply@blogger.comtag:blogger.com,1999:blog-5359546512544809971.post-9167384448598020482014-11-14T16:10:21.486-08:002014-11-14T16:10:21.486-08:00Does it handle dependency mocking? Does it handle dependency mocking? Vilém Procházkahttps://www.blogger.com/profile/15449315603952485755noreply@blogger.comtag:blogger.com,1999:blog-5359546512544809971.post-7517462839207124942014-11-14T07:59:32.309-08:002014-11-14T07:59:32.309-08:00The best use that I've heard so far is working...The best use that I've heard so far is working with legacy code that does not have tests. Running Smart Unit Tests would quickly generate a suite of tests that shows what the code does now. Then when you start to make changes (updates, refactoring, etc.) you can verify that you don't break the existing functionality.<br /><br />As I mentioned, I'm still trying to figure out how (or if) this fits in to a green field scenario where we're writing completely new code.<br /><br />-JeremyJeremyhttps://www.blogger.com/profile/06749690234470413216noreply@blogger.comtag:blogger.com,1999:blog-5359546512544809971.post-1868295265776707972014-11-14T07:36:52.969-08:002014-11-14T07:36:52.969-08:00This looks awesome, I've been following PEX fo...This looks awesome, I've been following PEX for a while but they limited it to just PCL (portable class libraries), which is your not using doesn't help you much. <br /><br />Is the usefulness of Smart Unit Tests best to be thought of as a scaffolding tool, with the idea that you use it once on existing code that has no tests and then tweak the generated test code? Anonymousnoreply@blogger.com