public void CreateSetAsEndCommandItemTest()
        {
            _hexDataContext.SelectionStart = 0;
            _hexDataContext.FocusPosition  = 511;
            var cmi = HexDataContextCommandFactory.CreateSetAsEndCommandItem(_hexDataContext);

            cmi.Command.Execute(null);
            Assert.AreEqual(_hexDataContext.SelectionLength, 512);
            Assert.AreEqual(_hexDataContext.SelectionStart, 0);
        }
        private static void AddContextCommandsToHexDataContext(IHexDataContext hexDataContext)
        {
            if (hexDataContext == null)
            {
                throw new ArgumentNullException(nameof(hexDataContext));
            }

            hexDataContext.AddContextCommand(HexDataContextCommandFactory.CreateSetAsStartCommandItem(hexDataContext));
            hexDataContext.AddContextCommand(HexDataContextCommandFactory.CreateSetAsEndCommandItem(hexDataContext));
            hexDataContext.AddContextCommand(HexDataContextCommandFactory.CreateCopyToNewFileCommandItem(hexDataContext));
            hexDataContext.AddContextCommand(HexDataContextCommandFactory.CreateCopyToClipBoardCommandItem(hexDataContext));
            hexDataContext.AddContextCommand(HexDataContextCommandFactory.CreateCopyToCopyHexToCBoardCommandItem(hexDataContext));
            hexDataContext.AddContextCommand(HexDataContextCommandFactory.CreateCopyAsProCodeCommandItem(hexDataContext));
        }