public void TestInitialize() { margin = Utils.CreateMarginForTest(); marginModel = MarginModel.ToModel(margin); text = Utils.CreateTextForTest(); textModel = TextModel.ToModel(text); user = Utils.CreateUserForTest(); userModel = UserModel.ToModel(user); mockMarginAuthorizationLogic = new Mock <IAuthorizationBusinessLogic>(); mockMarginBusinessLogic = new Mock <IMarginBusinessLogic>(); mockAuditLogBusinessLogic = new Mock <IAuditLogBussinesLogic>(); marginController = new MarginController(mockMarginBusinessLogic.Object, mockMarginAuthorizationLogic.Object, mockAuditLogBusinessLogic.Object); InitializeToken(); }
public void IntegrationTest_ExpectedParameters_Ok() { var requestMessage = new HttpRequestMessage(); IMarginBusinessLogic marginBL = new MarginBusinessLogic(new MarginDataAccess()); IUserDataAccess userDa = new UserDataAccess(); IAuthorizationBusinessLogic auth = new AuthorizationBusinessLogic(userDa); IAuditLogBussinesLogic audit = new AuditLogBussinesLogic(); MarginController marginC = new MarginController(marginBL, auth, audit); marginC.Request = requestMessage; MarginModel margin2 = MarginModel.ToModel(Utils.CreateMarginForTest()); marginC.Post(marginModel); marginC.Post(margin2); marginC.Get(margin.Id); margin2.OwnStyleClass = "modified"; marginC.Put(margin2.Id, margin2); marginC.Delete(marginModel.Id); IHttpActionResult statusObtained = marginC.Get(); }
public Component() { ClipArea = new ClipArea(this); _positionController = new PositionController(this); _sizeController = new SizeController(this); _marginController = new MarginController(this); _paddingController = new PaddingController(this); _scrollController = new ScrollController(this); _tPosObserver = new Observer <Vector2i>(TargetPosition); _tRelPosObserver = new Observer <Vector2i>(TargetRelativePosition); _tSizObserver = new Observer <Vector2i>(TargetSize); _tMarObserver = new Observer <Spacing>(TargetMargins); _tPadObserver = new Observer <Spacing>(TargetPaddings); _tScrObserver = new Observer <Vector2i>(TargetScrollOffset); StyleManager = new StyleManager(this); TransformChanged = true; StyleChanged = true; }