You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
564 B
C#
30 lines
564 B
C#
6 years ago
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
|
||
|
using Xunit;
|
||
|
|
||
|
using LinqStudy;
|
||
|
|
||
|
namespace LinqStudy.Test.LinqToObject
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Select 测试
|
||
|
/// </summary>
|
||
|
public class SelectTest
|
||
|
{
|
||
|
[Fact]
|
||
|
public void TestName()
|
||
|
{
|
||
|
// Arrange
|
||
|
var persons = PersonManager.GetPersons();
|
||
|
// Act
|
||
|
var maps=persons.Select(p=>p.Age).ToList();
|
||
|
|
||
|
// Assert
|
||
|
Assert.IsType<List<int>>(maps);
|
||
|
}
|
||
|
}
|
||
|
}
|