Mercurial > pub > ImplabNet
changeset 188:3071220371f8 ref20160224
Updated VS project
author | cin |
---|---|
date | Fri, 22 Apr 2016 12:59:31 +0300 |
parents | dd4a3590f9c6 |
children | b60643b47078 |
files | .hgignore Implab.Test/Implab.Test.csproj Implab.Test/RunnableComponentTests.cs |
diffstat | 3 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Tue Apr 19 17:35:20 2016 +0300 +++ b/.hgignore Fri Apr 22 12:59:31 2016 +0300 @@ -17,3 +17,4 @@ MonoPlay/obj/ Implab.Test/Implab.Format.Test/bin/ Implab.Test/Implab.Format.Test/obj/ +*.suo
--- a/Implab.Test/Implab.Test.csproj Tue Apr 19 17:35:20 2016 +0300 +++ b/Implab.Test/Implab.Test.csproj Fri Apr 22 12:59:31 2016 +0300 @@ -62,8 +62,10 @@ </ItemGroup> <ItemGroup> <Compile Include="AsyncTests.cs" /> + <Compile Include="CancelationTests.cs" /> <Compile Include="PromiseHelper.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="RunnableComponentTests.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Implab\Implab.csproj">
--- a/Implab.Test/RunnableComponentTests.cs Tue Apr 19 17:35:20 2016 +0300 +++ b/Implab.Test/RunnableComponentTests.cs Fri Apr 22 12:59:31 2016 +0300 @@ -9,7 +9,7 @@ using NUnit.Framework; using TestClassAttribute = NUnit.Framework.TestFixtureAttribute; using TestMethodAttribute = NUnit.Framework.TestAttribute; - +using AssertFailedException = NUnit.Framework.AssertionException; #else using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -23,8 +23,8 @@ static void ShouldThrow(Action action) { try { action(); - Assert.Fail(); - } catch(AssertionException) { + Assert.Fail(); + } catch (AssertFailedException) { throw; } catch { } @@ -131,7 +131,8 @@ p.Cancel(); ShouldThrow(() => p.Join(1000)); Assert.AreEqual(ExecutionState.Failed, comp.State); - Assert.IsInstanceOfType(typeof(OperationCanceledException), comp.LastError); + + Assert.IsInstanceOfType(comp.LastError, typeof(OperationCanceledException)); comp.Dispose(); } @@ -183,8 +184,8 @@ Assert.AreEqual(ExecutionState.Stopping, comp.State); p.Cancel(); ShouldThrow(() => p.Join(1000)); - Assert.AreEqual(ExecutionState.Failed, comp.State); - Assert.IsInstanceOfType(typeof(OperationCanceledException), comp.LastError); + Assert.AreEqual(ExecutionState.Failed, comp.State); + Assert.IsInstanceOfType(comp.LastError, typeof(OperationCanceledException)); comp.Dispose(); }