2021-08-11 11:06:46 +03:00
|
|
|
using System;
|
2017-03-14 19:08:04 +03:00
|
|
|
using System.IO;
|
|
|
|
using System.Text;
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
2020-10-09 17:06:19 +03:00
|
|
|
using Xamarin.Tests;
|
|
|
|
|
2017-03-14 19:08:04 +03:00
|
|
|
namespace Xamarin.MMP.Tests
|
|
|
|
{
|
|
|
|
[TestFixture]
|
|
|
|
public partial class MMPTests
|
|
|
|
{
|
2020-10-09 17:06:19 +03:00
|
|
|
public string RoslynTestProjectRoot => Path.Combine (Configuration.TestProjectsDirectory, "RoslynTestApp");
|
2017-03-14 19:08:04 +03:00
|
|
|
|
2018-11-09 22:38:39 +03:00
|
|
|
[Test]
|
2020-10-01 09:41:01 +03:00
|
|
|
public void XMModernRoslynProject_ShouldBuildAndRunWithMSBuild ()
|
2017-03-14 19:08:04 +03:00
|
|
|
{
|
2017-03-30 23:04:21 +03:00
|
|
|
string projectPath = Path.Combine (RoslynTestProjectRoot, "Modern/RoslynTestApp.sln");
|
2017-03-14 19:08:04 +03:00
|
|
|
|
|
|
|
TI.CleanUnifiedProject (projectPath);
|
2019-07-15 20:19:24 +03:00
|
|
|
TI.BuildProject (projectPath);
|
2019-10-14 17:18:46 +03:00
|
|
|
TI.RunAndAssert (Path.Combine (RoslynTestProjectRoot, "Modern/bin/Debug/RoslynTestApp.app/Contents/MacOS/RoslynTestApp"), Array.Empty<string> (), "Run");
|
2017-03-14 19:08:04 +03:00
|
|
|
}
|
|
|
|
|
2018-11-09 22:38:39 +03:00
|
|
|
[Test]
|
2020-10-01 09:41:01 +03:00
|
|
|
public void XMFullRoslynProject_ShouldBuildAndRunWithMSBuild ()
|
2017-03-14 19:08:04 +03:00
|
|
|
{
|
2017-03-30 23:04:21 +03:00
|
|
|
string projectPath = Path.Combine (RoslynTestProjectRoot, "Full/RoslynTestApp.sln");
|
2017-03-14 19:08:04 +03:00
|
|
|
|
|
|
|
TI.CleanUnifiedProject (projectPath);
|
2019-07-15 20:19:24 +03:00
|
|
|
TI.BuildProject (projectPath);
|
2019-10-14 17:18:46 +03:00
|
|
|
TI.RunAndAssert (Path.Combine (RoslynTestProjectRoot, "Full/bin/Debug/RoslynTestApp.app/Contents/MacOS/RoslynTestApp"), Array.Empty<string> (), "Run");
|
2017-03-14 19:08:04 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|