コード例 #1
0
        public void InitializeConsoleText(
            UserInterfaceController userInterfaceController,
            FileSystemState fileSystemState,
            DirectoryController directoryController,
            Text inputText,
            Text outputText)
        {
            Debug.Assert(inputText != null, "The input text object is not properly set.");
            Debug.Assert(outputText != null, "The output text object is not properly set.");

            // Ensure that the console text objects are empty to start (except for prompts and path metadata)
            var currentDirectory     = fileSystemState.GetCurrentDirectory();
            var currentDirectoryPath = directoryController.GetDirectoryPath(currentDirectory);

            userInterfaceController.SetUserInterfaceTextWithInputPrompt(inputText, string.Empty, currentDirectoryPath);
            userInterfaceController.SetUserInterfaceText(outputText, updatedText: string.Empty);
        }
コード例 #2
0
ファイル: PathTests.cs プロジェクト: Genetic-Games/SysEarth
        public void CannotGetPathForNullDirectory()
        {
            var path = _directoryController.GetDirectoryPath(null);

            Assert.IsNull(path);
        }