public void ctor_Observation_IsSet(SimulationResultQuote sut)
        {
            var comparer = new LambdaEqualityComparer<Observation>(
                EqualsMethod: (o1,o2) => o1.Date == o2.Date && o1.CurrentQuoteCount.SequenceEqual(o2.CurrentQuoteCount));

            Assert.Equal<Observation>(Observation, sut.Observation, comparer );
        }
        public static Tuple<SimulationResult, IReadOnlyList<SimulationResultQuote>, SyncTickers> CreateSut()
        {
            var quotes = new SimulationResultQuote[] { SimulationResultQuoteTests.CreateSut() }.AsReadOnlyList();
            var syncTickers = new SyncTickersBuilder().AddTicker(0).AddObservation(0, 1).AddDescription().Build();

            return Tuple.Create(new SimulationResult(quotes, syncTickers), quotes, syncTickers);
        }
 public void Transactions_SetToNull_GetReturnsEmptyCollection(SimulationResultQuote sut)
 {
     sut.Transactions = null;
     Assert.Equal<int>(0, sut.Transactions.Count);
 }
 public void Date_IsEqualToObservationDate(SimulationResultQuote sut)
 {
     Assert.Equal<DateTime>(Observation.Date, sut.Date);
 }
 public void ctor_TickerQuantity_IsSet(SimulationResultQuote sut)
 {
     Assert.True(TickerQuantity.SequenceEqual(sut.TickerQuantity), "TickerQuantity is wrong.");
 }
 public void ctor_Cash_IsSet(SimulationResultQuote sut)
 {
     Assert.Equal<double>(1, sut.Cash);
 }
 public void Transactions_SetToSth_GetReturnsWhatWasSet(SimulationResultQuote sut)
 {
     var transactions = new Transaction[] { new Transaction(TransactionType.Buy, 1, 1, 0, 0, 1) }.AsReadOnlyList();
     sut.Transactions = transactions;
     Assert.Same(transactions, sut.Transactions);
 }