コード例 #1
0
        public void FindAllSourcesWorks()
        {
            var buffer   = new byte[0x200];
            var model    = new PokemonModel(buffer);
            var viewPort = new ViewPort("file.txt", model)
            {
                Width = 0x10, Height = 0x10
            };
            var editor = new EditorViewModel(new StubFileSystem());

            editor.Add(viewPort);

            viewPort.SelectionStart = new Point(4, 1);
            viewPort.Edit("<000120>");
            viewPort.FollowLink(4, 1);

            viewPort.FindAllSources(0, 0);

            Assert.Equal(1, editor.SelectedIndex);
        }