mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:25:43 +00:00
Add tests for AsArray/AsEnumerable
This commit is contained in:
parent
47f1489cbb
commit
ae24d94da2
27
X10D.Tests/src/Core/CoreTests.cs
Normal file
27
X10D.Tests/src/Core/CoreTests.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using X10D.Core;
|
||||
using X10D.Text;
|
||||
|
||||
namespace X10D.Tests.Core;
|
||||
|
||||
[TestClass]
|
||||
public class CoreTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void AsArrayShouldBeLength1()
|
||||
{
|
||||
Assert.AreEqual(1, 0.AsArray().Length);
|
||||
Assert.AreEqual(1, string.Empty.AsArray().Length);
|
||||
Assert.AreEqual(1, true.AsArray().Length);
|
||||
Assert.AreEqual(1, ((object?)null).AsArray().Length);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AsEnumerableShouldBeLength1()
|
||||
{
|
||||
Assert.AreEqual(1, 0.AsEnumerable().Count());
|
||||
Assert.AreEqual(1, string.Empty.AsEnumerable().Count());
|
||||
Assert.AreEqual(1, true.AsEnumerable().Count());
|
||||
Assert.AreEqual(1, ((object?)null).AsEnumerable().Count());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user