Beispiel #1
0
        private async Task AppendShellRobot(Robot robot)
        {
            var shellRobotsText = await shellRobotFileService.GetFileText(webHostEnvironment.WebRootPath).ConfigureAwait(false);

            robot.Append(shellRobotsText);

            // add any dynamic robots data from the Shell app
        }
        public async Task RobotsControllerWritesShellRobotsTextAtFirstPositionWhenFileExists()
        {
            const string SomeShellFileText = "SomeFileText";

            A.CallTo(() => defaultShellRobotFileService.GetFileText(A <string> .Ignored)).Returns(SomeShellFileText);

            var result = await defaultController.Robot().ConfigureAwait(false);

            var resultLines = result.Content.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

            Assert.Equal(resultLines[0], SomeShellFileText);
        }