public void Undo_업데이트제거과정시에_업데이트_전의_데이터가_없는_경우() { //Arrange MockRepository mocks = new MockRepository(); UserInfo stubData = mocks.Stub<UserInfo>(); UserInfo stubPreData = null; stubData.id = "id"; stubData.password = "******"; ICommandListener mockListener = mocks.DynamicMock<UserAuthController>(); UpdateUserInfo uui = new UpdateUserInfo(stubData, mockListener); uui.preUserInfo = stubPreData; //Act uui.Undo(); }
public void Undo_업데이트제거과정시에_업데이트_전의_데이터가_없는_경우() { //Arrange MockRepository mocks = new MockRepository(); UserInfo stubData = mocks.Stub <UserInfo>(); UserInfo stubPreData = null; stubData.id = "id"; stubData.password = "******"; ICommandListener mockListener = mocks.DynamicMock <UserAuthController>(); UpdateUserInfo uui = new UpdateUserInfo(stubData, mockListener); uui.preUserInfo = stubPreData; //Act uui.Undo(); }
public void Undo_업데이트제거과정_정상적으로_거치는지_검증() { MockRepository mocks = new MockRepository(); UserInfo stubData = mocks.Stub<UserInfo>(); UserInfo stubPreData = mocks.Stub<UserInfo>(); stubData.id = "id"; stubData.password = "******"; ICommandListener mockListener = mocks.DynamicMock<UserAuthController>(); UpdateUserInfo uui = new UpdateUserInfo(stubData, mockListener); uui.preUserInfo = stubPreData; using (mocks.Record()) { mockListener.Update(stubPreData, stubPreData); LastCall.Return(true); } uui.Undo(); mocks.Verify(mockListener); }
public void Undo_업데이트제거과정_정상적으로_거치는지_검증() { MockRepository mocks = new MockRepository(); UserInfo stubData = mocks.Stub <UserInfo>(); UserInfo stubPreData = mocks.Stub <UserInfo>(); stubData.id = "id"; stubData.password = "******"; ICommandListener mockListener = mocks.DynamicMock <UserAuthController>(); UpdateUserInfo uui = new UpdateUserInfo(stubData, mockListener); uui.preUserInfo = stubPreData; using (mocks.Record()) { mockListener.Update(stubPreData, stubPreData); LastCall.Return(true); } uui.Undo(); mocks.Verify(mockListener); }