public void Delete_Test_파라미터_있는_메서드_파라미터로_Null값이나_빈값_입력__Exception발생(string id) { MockRepository mocks = new MockRepository(); //[1] IDataModel 파라미터 구성 SQLDataServiceModel mockDataModel = mocks.DynamicMock<SQLDataServiceModel>(); ISQLWebService stubSQLWebService = mocks.Stub<ISQLWebService>(mocks.Stub<InstanceContext>()); mockDataModel.EncryptionSeed = "1234"; mockDataModel.sqlService = stubSQLWebService; //[2] IDataQueryRepository 파라미터 구성 IDataQueryRepository stubQueryRepository = mocks.Stub<SQLDataQueryRepository>(); //[3] stub과 mock객체 사용해서 테스트 하고자 하는 객체 생성 UserAuthController uac = new UserAuthController(mockDataModel, stubQueryRepository); uac.Delete(id); }
public void Delete_Test_파라미터_있는_메서드_파라미터로_Null값이나_빈값_입력__Exception발생(string id) { MockRepository mocks = new MockRepository(); //[1] IDataModel 파라미터 구성 SQLDataServiceModel mockDataModel = mocks.DynamicMock <SQLDataServiceModel>(); ISQLWebService stubSQLWebService = mocks.Stub <ISQLWebService>(mocks.Stub <InstanceContext>()); mockDataModel.EncryptionSeed = "1234"; mockDataModel.sqlService = stubSQLWebService; //[2] IDataQueryRepository 파라미터 구성 IDataQueryRepository stubQueryRepository = mocks.Stub <SQLDataQueryRepository>(); //[3] stub과 mock객체 사용해서 테스트 하고자 하는 객체 생성 UserAuthController uac = new UserAuthController(mockDataModel, stubQueryRepository); uac.Delete(id); }
public void Delete_Test_파라미터_있는_메서드__계정제한하는_쿼리_실행_시키는지(string id) { MockRepository mocks = new MockRepository(); //[1] IDataModel 파라미터 구성 SQLDataServiceModel mockDataModel = mocks.DynamicMock<SQLDataServiceModel>(); ISQLWebService stubSQLWebService = mocks.Stub<ISQLWebService>(mocks.Stub<InstanceContext>()); mockDataModel.EncryptionSeed = "1234"; mockDataModel.sqlService = stubSQLWebService; //[2] IDataQueryRepository 파라미터 구성 IDataQueryRepository stubQueryRepository = mocks.Stub<SQLDataQueryRepository>(); //[3] stub과 mock객체 사용해서 테스트 하고자 하는 객체 생성 UserAuthController uac = new UserAuthController(mockDataModel,stubQueryRepository); using (mocks.Record()) { string query = stubQueryRepository.DeleteUserInfo(id); mockDataModel.SetData(query); } uac.Delete(id); }
public void Delete_Test_파라미터_있는_메서드__계정제한하는_쿼리_실행_시키는지(string id) { MockRepository mocks = new MockRepository(); //[1] IDataModel 파라미터 구성 SQLDataServiceModel mockDataModel = mocks.DynamicMock <SQLDataServiceModel>(); ISQLWebService stubSQLWebService = mocks.Stub <ISQLWebService>(mocks.Stub <InstanceContext>()); mockDataModel.EncryptionSeed = "1234"; mockDataModel.sqlService = stubSQLWebService; //[2] IDataQueryRepository 파라미터 구성 IDataQueryRepository stubQueryRepository = mocks.Stub <SQLDataQueryRepository>(); //[3] stub과 mock객체 사용해서 테스트 하고자 하는 객체 생성 UserAuthController uac = new UserAuthController(mockDataModel, stubQueryRepository); using (mocks.Record()) { string query = stubQueryRepository.DeleteUserInfo(id); mockDataModel.SetData(query); } uac.Delete(id); }