public void execute_Test_생성자에_입력되는_파라미터가_Null인_경우__예외_발생_하는가() { //Arrange MockRepository mocks = new MockRepository(); UserInfo data = null; ICommandListener mockCommandListener = mocks.DynamicMock<UserAuthController>(); MakeAuth MakeUserCommand = new MakeAuth(data, mockCommandListener); //Act MakeUserCommand.execute(); }
public void execute_Test_생성자에_입력되는_파라미터가_Null인_경우__예외_발생_하는가() { //Arrange MockRepository mocks = new MockRepository(); UserInfo data = null; ICommandListener mockCommandListener = mocks.DynamicMock <UserAuthController>(); MakeAuth MakeUserCommand = new MakeAuth(data, mockCommandListener); //Act MakeUserCommand.execute(); }
public void execute_Test_입력할_ID_Password_User권한이_Null_일때_예외가_발생하는지(string id,string password,string userAuth) { //Arrange MockRepository mocks = new MockRepository(); UserInfo data = mocks.Stub<UserInfo>(); data.id = id; data.password = password; data.userAuth = userAuth; data.userType = 사용자등급.일반사용자; ICommandListener mockCommandListener = mocks.DynamicMock<UserAuthController>(); MakeAuth MakeUserCommand = new MakeAuth(data, mockCommandListener); //Act MakeUserCommand.execute(); }
public void execute_Test_기존에_입력된_ID와_중복된_ID인_경우_예외가_발생하는지() { //Arrange MockRepository mocks = new MockRepository(); UserInfo data = mocks.Stub<UserInfo>(); data.id = "id"; data.password = "******"; data.userAuth = "userAuth"; ICommandListener mockCommandListener = mocks.DynamicMock<UserAuthController>(); MakeAuth MakeUserCommand = new MakeAuth(data, mockCommandListener); MakeUserCommand.strIDList = new string[] { "id"}; //Act MakeUserCommand.execute(); }
public void execute_Test_입력할_ID_Password_User권한이_Null_일때_예외가_발생하는지(string id, string password, string userAuth) { //Arrange MockRepository mocks = new MockRepository(); UserInfo data = mocks.Stub <UserInfo>(); data.id = id; data.password = password; data.userAuth = userAuth; data.userType = 사용자등급.일반사용자; ICommandListener mockCommandListener = mocks.DynamicMock <UserAuthController>(); MakeAuth MakeUserCommand = new MakeAuth(data, mockCommandListener); //Act MakeUserCommand.execute(); }
public void execute_Test_기존에_입력된_ID와_중복된_ID인_경우_예외가_발생하는지() { //Arrange MockRepository mocks = new MockRepository(); UserInfo data = mocks.Stub <UserInfo>(); data.id = "id"; data.password = "******"; data.userAuth = "userAuth"; ICommandListener mockCommandListener = mocks.DynamicMock <UserAuthController>(); MakeAuth MakeUserCommand = new MakeAuth(data, mockCommandListener); MakeUserCommand.strIDList = new string[] { "id" }; //Act MakeUserCommand.execute(); }
public void execute_Test_정상적인_값을_파라미터로_주고_정상적으로_입력되는지() { MockRepository mocks = new MockRepository(); UserInfo data = mocks.Stub <UserInfo>(); ICommandListener mockCommandListener = mocks.DynamicMock <UserAuthController>(); MakeAuth MakeUserCommand = new MakeAuth(data, mockCommandListener); using (mocks.Record()) { data.id = "id"; data.password = "******"; data.userAuth = "userAuth"; data.userType = 사용자등급.일반사용자; mockCommandListener.Insert(data); LastCall.Return(true); } MakeUserCommand.execute(); mocks.Verify(mockCommandListener); }
public void execute_Test_정상적인_값을_파라미터로_주고_정상적으로_입력되는지() { MockRepository mocks = new MockRepository(); UserInfo data= mocks.Stub<UserInfo>(); ICommandListener mockCommandListener= mocks.DynamicMock<UserAuthController>(); MakeAuth MakeUserCommand = new MakeAuth(data, mockCommandListener); using (mocks.Record()) { data.id = "id"; data.password = "******"; data.userAuth = "userAuth"; data.userType = 사용자등급.일반사용자; mockCommandListener.Insert(data); LastCall.Return(true); } MakeUserCommand.execute(); mocks.Verify(mockCommandListener); }