-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from dvsekhvalnov/rfc_7797
Rfc 7797: unencoded and detached content support
- Loading branch information
Showing
27 changed files
with
1,523 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using System.Collections.Generic; | ||
using Jose; | ||
using Xunit; | ||
|
||
namespace UnitTests | ||
{ | ||
public class CollectionsTest | ||
{ | ||
[Fact] | ||
public void UnionArrays() | ||
{ | ||
var src = new[] {"one", "two"}; | ||
var other = new[] {"two", "three"}; | ||
|
||
Assert.Equal(Collections.Union(src, other), new [] {"one", "two", "three"}); | ||
} | ||
|
||
[Fact] | ||
public void UnionArrayList() | ||
{ | ||
var src = new[] { "one", "two" }; | ||
var other = new List<string>(new [] { "two", "three" }); | ||
|
||
Assert.Equal(Collections.Union(src, other), new[] { "one", "two", "three" }); | ||
|
||
} | ||
|
||
[Fact] | ||
public void UnionArraySet() | ||
{ | ||
var src = new[] { "one", "two" }; | ||
var other = new HashSet<string>(new [] { "two", "three" }); | ||
|
||
Assert.Equal(Collections.Union(src, other), new[] { "one", "two", "three" }); | ||
|
||
} | ||
|
||
[Fact] | ||
public void UnionNonStrings() | ||
{ | ||
var src = new[] { "one", "two" }; | ||
var other = new[] { 2, 3 }; | ||
|
||
Assert.Equal(Collections.Union(src, other), new[] { "one", "two", "2", "3" }); | ||
} | ||
|
||
[Fact] | ||
public void UnionNull() | ||
{ | ||
var other = new[] { "two", "three" }; | ||
|
||
Assert.Equal(Collections.Union(null, other), new[] { "two", "three" }); | ||
} | ||
|
||
[Fact] | ||
public void UnionWithNonEnumerable() | ||
{ | ||
var src = new[] { "one", "two" }; | ||
var other = 3; | ||
|
||
Assert.Equal(Collections.Union(src, other), new[] { "one", "two" }); | ||
} | ||
|
||
[Fact] | ||
public void UnionWithNull() | ||
{ | ||
var src = new[] { "one", "two" }; | ||
|
||
Assert.Equal(Collections.Union(src, null), new[] { "one", "two" }); | ||
} | ||
|
||
} | ||
} |
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
Oops, something went wrong.