AddScriptsProjectsToSolution() public method

public AddScriptsProjectsToSolution ( ) : void
return void
コード例 #1
0
            public void DoesntAddAReferenceToTheScriptsProjectIfItAlreadyExists()
            {
                var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
                {
                    {_solutionPath, new MockFileData(_projectReferenceString)}
                });

                var solutionEditor = new ScriptsSolutionEditor(fileSystem, _sourceCodeDirectory);
                solutionEditor.AddScriptsProjectsToSolution();

                Assert.AreEqual(_projectReferenceString, new MockFile(fileSystem).ReadAllText(_solutionPath));
            }
コード例 #2
0
            public void IsCaseInsensitive()
            {
                var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
                {
                    {_solutionPath, new MockFileData(_projectReferenceString.ToLower())}
                });

                var solutionEditor = new ScriptsSolutionEditor(fileSystem, _sourceCodeDirectory);
                solutionEditor.AddScriptsProjectsToSolution();

                Assert.IsTrue(_projectReferenceString.Equals(new MockFile(fileSystem).ReadAllText(_solutionPath), StringComparison.OrdinalIgnoreCase));
            }
コード例 #3
0
            public void AddsAReferenceToTheScriptsProjectToTheSolutionFile()
            {
                var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
                {
                    {_solutionPath, new MockFileData("EndProject")}
                });

                var solutionEditor = new ScriptsSolutionEditor(fileSystem, _sourceCodeDirectory);
                solutionEditor.AddScriptsProjectsToSolution();

                Assert.AreEqual("EndProject" + _projectReferenceString, new MockFile(fileSystem).ReadAllText(_solutionPath));
            }