私はasp.net mvcアプリケーションで作業しており、ユニットテストでBDDスタイルを作成しています。 例ASP.net MVC RTMテストの命名規則
GetResource_WhenResourceFileExists_ShouldReturnResources()
しかし、私は私のコントローラのテストを書いていたとき、私は通常、同じ名前の2つの方法があります。 1つは取得要求用のパラメータなし、1つは投稿用です。誰かがこの2つを区別するための良い命名規則を持っていますか?
1.
LogIn_WithParameters_ShouldReturnLogInView()
LogIn_WithoutParameters_WhenAuthenticationFailed_ShouldReturnLogInView()
LogIn_WithoutParameters_WhenAuthenticationPassed_ShouldReturnProfileRedirect()
2.
LogIn_Get_ShouldReturnLogInView()
LogIn_Post_WhenAuthenticationFailed_ShouldReturnLogInView()
LogIn_Post_WhenAuthenticationPassed_ShouldReturnProfileRedirect()
3.
LogIn_ShouldReturnLogInView()
LogIn_WhenCalledWithParametersAndAuthenticationFailed_ShouldReturnLogInView()
LogIn_WhenCalledWithParametersAndAuthenticationPassed_ShouldReturnProfileRedirect()
どれ意見:
私が考えることができますか?