Exemple #1
0
        public void WriteAndReadArguments()
        {
            // Setup
            Bookmark bookmark = new Bookmark(false, 1, _state, _screen);

            // Act
            _history.AddBookmark(100, bookmark);
            _history.AddBookmark(200, bookmark);
            _mockFile.Clear();
            _file.WriteHistory("Test");
            _fileInfo = MachineFile.Read(_mockFile);

            // Verify
            Assert.AreEqual(1, _mockFile.Lines.Count(line => line.StartsWith("args:")));
            Assert.Zero(_mockFile.Lines.Count(line => line.StartsWith("arg:")));
            Assert.True(HistoriesEqual(_fileInfo.History, _history));
        }