Esempio n. 1
0
        public void ShouldThrowWhenNoFilesProvided()
        {
            // Given
            ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate());

            // When, Then
            Assert.Throws <ArgumentException>(() => fixture.Run());
        }
Esempio n. 2
0
        public void ShouldThrowOnNullProjectPath()
        {
            // Given
            ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate())
            {
                ProjectFilePath = null
            };

            // When, Then
            Assert.Throws <ArgumentNullException>(() => fixture.Run());
        }
Esempio n. 3
0
        public void ShouldAddMultipleFiles()
        {
            // Given
            ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate("file.csx", "script.csx"));

            // When
            ToolFixtureResult result = fixture.Run();

            // Then
            FilePath proj = fixture.GetProjectFilePath();

            Assert.True(result.Args == $"\"{proj}\" \"file.csx\" \"script.csx\"");
        }
Esempio n. 4
0
        public void ShouldAddProjectFile()
        {
            // Given
            ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate("file.csx"));

            // When
            ToolFixtureResult result = fixture.Run();

            // Then
            FilePath proj = fixture.GetProjectFilePath();

            Assert.True(result.Args.StartsWith($"\"{proj}\""));
        }