public void IsSorted_InitializeDataExecution_ShouldReturnsTrue() { var collection = new SortableObservableBanksCollection(PrePrepared.BankList2, bank => bank.USDtoRUB.Bid); collection.InitializeData(); Assert.That(() => collection.IsSorted, Is.True.After(1000)); }
public void LambdaExpression_InitializeDataExecution_SortingByDescendingShouldWorkProperly() { var collection = new SortableObservableBanksCollection(PrePrepared.BankList3, bank => bank.USDtoRUB.Bid, true); collection.InitializeData(); Assert.That(() => collection[0].USDtoRUB.Bid, Is.EqualTo(PrePrepared.USD_RUB_Bid_79).After(1000)); }
public void IsDescendingSortOrder_CreateNewInstanceAndPassingTrue_ShouldReturnsTrue() { var collection1 = new SortableObservableBanksCollection(bank => bank.USDtoRUB.Bid, true); var collection2 = new SortableObservableBanksCollection(new List<Bank>(), bank => bank.USDtoRUB.Bid, true); Assert.That(collection1.IsDescendingSortOrder, Is.True); Assert.That(collection2.IsDescendingSortOrder, Is.True); }