Unit testing member access modifiers  
Author Message
JesseJ





PostPosted: Visual C# General, Unit testing member access modifiers Top

I'm about to construct an MVC application where the models and controller are in one assembly, and the viewer is in another. In some instances the model types are surfaced to the viewer for display in the UI. I want to just use the internal access modifier on selected model members to prevent the viewer from manipulating (due to lazy UI programming or otherwise) the models without the controller's knowledge. I have what otherwise appears to be a comprehensive plan for unit testing, but I'm not using any sort of deliberate testing strategy to ensure the proper application of the member access modifiers.

Does anyone have any advice for me to ensure side-effect-free access to my models from the viewer under the scenario I just described Is this too general without more specific implementation details I have to imagine that this comes up a lot in MVC, but this is my first time using the pattern.

TIA,

Jesse


Visual C#19