Suggestion: Name change GrandChild should be GrandParent in ChildChangedTests #3032
Replies: 1 comment
-
These are some good ideas, thank you. For some background, many of the tests were written around 2007 when I had a team of junior folks available to help create tests. So quite a few of the tests were written by people as they were learning CSLA - and I wasn't about to turn down all that help!! 😄 Other tests have "evolved" over time, and I'm sure some of the original naming no longer applies. I'm perfectly happy to accept PRs that improve the tests! @TheCakeMonster has been working on updating a lot of the tests for CSLA 6 - and iirc, there's a whole big test project that isn't currently in the CI build b/c it doesn't quite all work yet - so what we're running right now is a subset of the full test suite. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
csla/Source/Csla.test/ChildChanged/ChildChangedTests.cs
Lines 97 to 99 in 10ca30c
The test function should keep its name aka "GrandChild" because it's truly testing the behavior of grand children. However the object should be called "GrandParent" because it has a child with a child.
I would like a few of the other classes to have more descriptive names as well. The use of Single feels pointless for some of the types. I've thought a bit about the current names and I'm not 100% confident in any names I could come up with. So I would just like to put it out there for discussion.
For example SingleChild is actually more of a parent. It can be a child but also a root & parent or child & parent? I would think ParentOfOne might be a better name.
SingleRoot is mostly a child but it can be a root. So should it be called Root or Child?
I think because these are test classes they should be named as direct as possible.
Beta Was this translation helpful? Give feedback.
All reactions