You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

IReadOnlyListExtensionsTests.cs 442 B

12345678910111213141516171819202122
  1. using LLama.Extensions;
  2. namespace LLama.Unittest;
  3. public class IReadOnlyListExtensionsTests
  4. {
  5. [Fact]
  6. public void IndexOfItem()
  7. {
  8. var items = (IReadOnlyList<int>)new List<int> { 1, 2, 3, 4, };
  9. Assert.Equal(2, items.IndexOf(3));
  10. }
  11. [Fact]
  12. public void IndexOfItemNotFound()
  13. {
  14. var items = (IReadOnlyList<int>)new List<int> { 1, 2, 3, 4, };
  15. Assert.Null(items.IndexOf(42));
  16. }
  17. }