public void Descriptions_ReturnsPassedToCtorArg() { var descriptions = CreateDescriptions(); var sut = new MultiQuoteList<IDate>(new QuoteListDataAttribute(1, 2).CreateCollection(), descriptions); Assert.True(object.ReferenceEquals(descriptions, sut.Descriptions)); }
public void TickerIndexByName_GivenValidName_ReturnsCorrectIndex(int descriptionCount, int lookForIndex) { var descriptions = CreateDescriptions(descriptionCount); string lookForName = descriptions[lookForIndex].Name; var sut = new MultiQuoteList<IDate>(new QuoteListDataAttribute(1, 2).CreateCollection(), descriptions); Assert.Equal<int?>(lookForIndex, sut.TickerIndexByName(lookForName)); }
public void TickerIndexByName_GivenInvalidName_ReturnsNull() { var sut = new MultiQuoteList<IDate>(new QuoteListDataAttribute(1, 2).CreateCollection(), CreateDescriptions()); Assert.Null(sut.TickerIndexByName("__invalid name__")); }
public void TickerCount_ReturnsUnderlyingTickerCount() { var descriptions = CreateDescriptions(); var sut = new MultiQuoteList<IDate>(new QuoteListDataAttribute(1, 2).CreateCollection(), descriptions); Assert.Equal<int>(descriptions.Count, sut.TickerCount); }