Tweak unit test so it's more reliable and fix binlog path (#7530)

* tweak unit test and fix bl path

* - change test to use ThrowsAsync

* - fix for nunit 2
This commit is contained in:
Shane Neuville 2019-09-16 09:48:52 -06:00 коммит произвёл Rui Marinho
Родитель d6559d53ee
Коммит 128cf1bbc4
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -112,8 +112,8 @@ namespace Xamarin.Forms.Core.UnitTests
Assert.True(calledFromMainThread, "Action not invoked from main thread.");
Assert.False(invoked, "Action invoked early.");
var aggregateEx = Assert.Throws<AggregateException>(() => task.Wait(100));
Assert.IsInstanceOf<ApplicationException>(aggregateEx.InnerException);
async Task MethodThatThrows() => await task;
Assert.Throws<ApplicationException>(async () => await MethodThatThrows());
Assert.True(invoked, "Action not invoked.");
}

Просмотреть файл

@ -63,7 +63,7 @@ jobs:
displayName: Build Android [Legacy Renderers]
vmImage: $(macOSVmImage)
targetFolder: Xamarin.Forms.ControlGallery.Android/legacyRenderers/
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage" /bl:$(Build.ArtifactStagingDirectory)\android-legacy.binlog'
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage" /bl:$(Build.ArtifactStagingDirectory)/android-legacy.binlog'
buildConfiguration: $(DefaultBuildConfiguration)
- template: build/steps/build-android.yml
@ -72,7 +72,7 @@ jobs:
displayName: Build Android [Pre-AppCompat]
vmImage: $(macOSVmImage)
targetFolder: Xamarin.Forms.ControlGallery.Android/preAppCompat
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage" /p:DefineConstants="TRACE DEBUG FORMS_APPLICATION_ACTIVITY APP" /bl:$(Build.ArtifactStagingDirectory)\android-preappcompact.binlog'
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage" /p:DefineConstants="TRACE DEBUG FORMS_APPLICATION_ACTIVITY APP" /bl:$(Build.ArtifactStagingDirectory)/android-preappcompact.binlog'
buildConfiguration: $(DefaultBuildConfiguration)
- template: build/steps/build-android.yml
@ -81,7 +81,7 @@ jobs:
displayName: Build Android [Fast Renderers]
vmImage: $(macOSVmImage)
targetFolder: Xamarin.Forms.ControlGallery.Android/newRenderers/
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage" /p:DefineConstants="TRACE DEBUG TEST_EXPERIMENTAL_RENDERERS APP" /bl:$(Build.ArtifactStagingDirectory)\android-newrenderers.binlog'
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage" /p:DefineConstants="TRACE DEBUG TEST_EXPERIMENTAL_RENDERERS APP" /bl:$(Build.ArtifactStagingDirectory)/android-newrenderers.binlog'
buildConfiguration: $(DefaultBuildConfiguration)
- job: osx