-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae091fb
commit a1fbd48
Showing
6 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Lindi.Core; | ||
using Lindi.Core.Linq; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
using static Lindi.Core.LindiMethods; | ||
|
||
namespace Lindi.Tests | ||
{ | ||
public class AwaitableBindingTests | ||
{ | ||
|
||
[Fact] | ||
public async void Test_Binding_Is_Awaitable() | ||
{ | ||
var binding = from value in Bind<ISample>() | ||
select new Sample(); | ||
|
||
var v = await binding; | ||
|
||
Assert.NotNull(v); | ||
Assert.IsType<Sample>(v); | ||
} | ||
|
||
[Fact] | ||
public async void Test_Get_Awaiter_On_Null_Binding_Throws_ArgumentNullException() | ||
{ | ||
IBinding<ISample> binding = null; | ||
|
||
await Assert.ThrowsAsync<ArgumentNullException>(async () => | ||
{ | ||
var v = await binding; | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters