Exemplo n.º 1
0
        private void RenderBoardAction(Vector2i position, int actionIndex)
        {
            Graphics.FillRectangle(RawColor.FromRGB(0xC57B10), Square(position, 0.4f));
            CreateBoardAction action        = (CreateBoardAction)Tree.Replay.Actions[actionIndex];
            Vector2f          pixelPosition = ToGraphic(new Vector2f(position.X, position.Y));

            if (action.Width == action.Height)
            {
                DrawString(action.Width.ToString(), font, RawColor.Black, pixelPosition, new Vector2f(0.5f, 0.5f));
            }
        }
        public void WithId_ACreateBoardAction_ReturnsExpectedAction()
        {
            const string actionId = "4f2b8b4d4f2cb9d16d3685ef";
            var          expected = new CreateBoardAction
            {
                Id = actionId,
                IdMemberCreator = "4e6a7fad05d98b02ba00845c",
                Date            = new DateTime(2011, 09, 09, 21, 09, 41, 515),
                Data            = new CreateBoardAction.ActionData
                {
                    Board = TheWelcomeBoard()
                },
                MemberCreator = CreateActionMemberTrello()
            }.ToExpectedObject();

            var actual = _trelloReadOnly.Actions.WithId(actionId);

            expected.ShouldEqual(actual);
        }
Exemplo n.º 3
0
        public void WithId_ACreateBoardAction_ReturnsExpectedAction()
        {
            const string actionId = "4f2b8b4d4f2cb9d16d3685ef";
            var expected = new CreateBoardAction
            {
                Id = actionId,
                IdMemberCreator = "4e6a7fad05d98b02ba00845c",
                Date = new DateTime(2011, 09, 09, 21, 09, 41, 515),
                Data = new CreateBoardAction.ActionData
                {
                    Board = TheWelcomeBoard()
				},
				MemberCreator = CreateActionMemberTrello()
			}.ToExpectedObject();

            var actual = _trelloReadOnly.Actions.WithId(actionId);

            expected.ShouldEqual(actual);
        }