예제 #1
0
        public void Undo_Test_입력했던_파라미터가_Null인_경우__Exception을_발생시키는가()
        {
            MockRepository   mocks = new MockRepository();
            UserInfo         data  = null;
            ICommandListener mockCommandListener = mocks.DynamicMock <UserAuthController>();
            MakeAuth         MakeUserCommand     = new MakeAuth(data, mockCommandListener);

            using (mocks.Record())
            {
                mockCommandListener.Delete(data);
            }
            MakeUserCommand.Undo();
        }
예제 #2
0
        public void Undo_Test_기존에_입력된_내용이_없을때()
        {
            MockRepository            mocks    = new MockRepository();
            ICommandListener          listener = mocks.DynamicMock <myInfoController>();
            myInfo                    mi       = mocks.Stub <myInfo>();
            MyInfoInsertUpdateCommand myIUCMD  = new MyInfoInsertUpdateCommand(mi, listener);

            myIUCMD.preMyInfo = null;
            using (mocks.Record())
            {
                listener.Delete(mi);
            }
            myIUCMD.Undo();
            mocks.Verify(listener);
        }
예제 #3
0
        public void Undo_Test_입력했던_파라미터_기록이_남아있는_경우()
        {
            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);

            using (mocks.Record())
            {
                mockCommandListener.Delete(data);
            }
            MakeUserCommand.Undo();
            mocks.Verify(mockCommandListener);
        }