Example #1
0
        public void Insert_Test_ID_Password_Auth에_해당하는_값을_Null로_준_경우_Exception이_발생하는지(string id, string password, string auth)
        {
            //Arrange
            MockRepository       mocks = new MockRepository();
            IDataQueryRepository stubQueryRepository = mocks.DynamicMock <IDataQueryRepository>();
            IDataModel           mockDBManager       = mocks.Stub <IDataModel>();
            UserInfo             stubUI = new UserInfo();

            stubUI.id       = id;
            stubUI.password = password;
            stubUI.userAuth = auth;
            stubUI.userType = 사용자등급.페기;
            UserAuthController userAuth = new UserAuthController(mockDBManager, stubQueryRepository);

            //Act,Assert
            userAuth.Insert(stubUI);
        }
Example #2
0
        public void Insert_Test_정상적인_값을_입력시_true를_반환하는지()
        {
            //Arrange
            MockRepository       mocks = new MockRepository();
            IDataQueryRepository stubQueryRepository = mocks.Stub <IDataQueryRepository>();
            IDataModel           mockDBManager       = mocks.Stub <IDataModel>();
            UserAuthController   userAuth            = new UserAuthController(mockDBManager, stubQueryRepository);
            UserInfo             stubUI = new UserInfo();

            stubUI.id       = "id";
            stubUI.password = "******";
            stubUI.userAuth = "auth";
            stubUI.userType = 사용자등급.페기;
            //Act
            bool isOK = userAuth.Insert(stubUI);

            //Assert
            Assert.IsTrue(isOK);
        }
Example #3
0
 public void Insert_Test_정상적인_값을_입력시_true를_반환하는지()
 {
     //Arrange
     MockRepository mocks = new MockRepository();
     IDataQueryRepository stubQueryRepository = mocks.Stub<IDataQueryRepository>();
     IDataModel mockDBManager = mocks.Stub<IDataModel>();
     UserAuthController userAuth = new UserAuthController(mockDBManager, stubQueryRepository);
     UserInfo stubUI = new UserInfo();
     stubUI.id = "id";
     stubUI.password = "******";
     stubUI.userAuth = "auth";
     stubUI.userType = 사용자등급.페기;
     //Act
     bool isOK= userAuth.Insert(stubUI);
     //Assert
     Assert.IsTrue(isOK);
 }
Example #4
0
 public void Insert_Test_ID_Password_Auth에_해당하는_값을_Null로_준_경우_Exception이_발생하는지(string id,string password,string auth)
 {
     //Arrange
     MockRepository mocks = new MockRepository();
     IDataQueryRepository stubQueryRepository = mocks.DynamicMock<IDataQueryRepository>();
     IDataModel mockDBManager = mocks.Stub<IDataModel>();
     UserInfo stubUI = new UserInfo();
     stubUI.id = id;
     stubUI.password = password;
     stubUI.userAuth = auth;
     stubUI.userType = 사용자등급.페기;
     UserAuthController userAuth = new UserAuthController(mockDBManager, stubQueryRepository);
     //Act,Assert
     userAuth.Insert(stubUI);
 }