Applabtoditesting.Tests.FakeDataService.GetAll C# (CSharp) Method

GetAll() public method

public GetAll ( ) : System.Collections.Generic.IEnumerable
return System.Collections.Generic.IEnumerable
        public System.Collections.Generic.IEnumerable<TodoItem> GetAll()
        {
            return _todoItems.Select (t => t.Value);
        }

Usage Example

示例#1
0
 public void Adding_A_TodoItem_Should_Increase_Total_Todo_Items_With_One()
 {
     // Bruke _dataService til å finne count før save/add og sammenlign med ny count
     var dataService = new FakeDataService();
     var oldCount = dataService.GetAll ().Count ();
     dataService.Create (new TodoItem{ Title = "Test" });
     var newCount = dataService.GetAll ().Count ();
     Assert.AreEqual (oldCount + 1, newCount);
 }
All Usage Examples Of Applabtoditesting.Tests.FakeDataService::GetAll