-
Notifications
You must be signed in to change notification settings - Fork 18
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
b58f042
commit 45b8d6a
Showing
6 changed files
with
157 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using LEGO.AsyncAPI.Models; | ||
using NUnit.Framework; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LEGO.AsyncAPI.Tests | ||
{ | ||
|
||
public class AsyncApiAnyTests | ||
{ | ||
[Test] | ||
public void Test() | ||
{ | ||
// Arrange | ||
// Act | ||
// Assert | ||
} | ||
|
||
|
||
[Test] | ||
public void ctor_Primitives() | ||
{ | ||
// Arrange | ||
// Act | ||
var a = new AsyncApiAny("string"); | ||
var b = new AsyncApiAny(1); | ||
var c = new AsyncApiAny(1.1); | ||
var d = new AsyncApiAny(true); | ||
var e = new AsyncApiAny(new MyType("test")); | ||
var f = new AsyncApiAny(new List<string>() { "test", "test2"}); | ||
var g = new AsyncApiAny(new List<MyType>() { new MyType("test") }); | ||
var h = new AsyncApiAny(new Dictionary<string, int>() { { "t", 2 } }); | ||
var i = new AsyncApiAny(new Dictionary<string, MyType>() { { "t", new MyType("test") } }); | ||
|
||
var v = e.GetValue<MyType>(); | ||
var k = i.GetValue<Dictionary<string, MyType>>(); | ||
// Assert | ||
} | ||
|
||
|
||
class MyType | ||
{ | ||
public MyType(string value) | ||
{ | ||
this.Value = value; | ||
} | ||
public string Value { get; set; } | ||
} | ||
} | ||
} |
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