Skip to content

Commit

Permalink
Clean up the ResolveSdksTaskTests a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Feb 21, 2018
1 parent 576a0c8 commit 7b63603
Showing 1 changed file with 18 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ namespace Xamarin.Android.Build.Tests {
[TestFixture]
[Parallelizable (ParallelScope.Self)]
public class ResolveSdksTaskTests : BaseTest {
#pragma warning disable 414
#pragma warning disable 414

static ApiInfo [] apiInfoSelection = new ApiInfo [] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
};

static object [] UseLatestAndroidSdkTestCases = new object [] {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ true,
/* targetFrameworkVersion */ "v8.99",
/* expectedTaskResult */ true,
Expand All @@ -34,11 +37,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ true,
/* targetFrameworkVersion */ "v8.0",
/* expectedTaskResult */ true,
Expand All @@ -49,11 +48,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ true,
/* targetFrameworkVersion */ "v8.1",
/* expectedTaskResult */ true,
Expand All @@ -64,11 +59,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ true,
/* targetFrameworkVersion */ "v6.0",
/* expectedTaskResult */ true,
Expand All @@ -79,11 +70,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ true,
/* targetFrameworkVersion */ null,
/* expectedTaskResult */ true,
Expand All @@ -94,11 +81,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ false,
/* targetFrameworkVersion */ "v8.99",
/* expectedTaskResult */ true,
Expand All @@ -109,11 +92,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ false,
/* targetFrameworkVersion */ "v8.1",
/* expectedTaskResult */ true,
Expand All @@ -124,11 +103,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ false,
/* targetFrameworkVersion */ "v8.0",
/* expectedTaskResult */ true,
Expand All @@ -139,11 +114,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ false,
/* targetFrameworkVersion */ null,
/* expectedTaskResult */ true,
Expand All @@ -154,11 +125,7 @@ public class ResolveSdksTaskTests : BaseTest {
new object[] {
/* buildtools */ "26.0.3",
/* jdk */ "1.8.0",
/* apis*/ new ApiInfo[] {
new ApiInfo () { Id = "26", Level = 26, Name = "Oreo", FrameworkVersion = "v8.0", Stable = true },
new ApiInfo () { Id = "27", Level = 27, Name = "Oreo", FrameworkVersion = "v8.1", Stable = true },
new ApiInfo () { Id = "P", Level = 28, Name = "P", FrameworkVersion = "v8.99", Stable = false },
},
/* apis*/ apiInfoSelection,
/* useLatestAndroidSdk */ false,
/* targetFrameworkVersion */ "v6.0",
/* expectedTaskResult */ false,
Expand Down

0 comments on commit 7b63603

Please sign in to comment.