Exemplo n.º 1
0
        public void Init()
        {
            _portfolioDisplay = Substitute.For <IPortfolioDisplay>();
            _stock            = Substitute.For <Stock>("Name", 1.0M);

            _uut      = new Portfolio("Name", _portfolioDisplay);
            _observer = Substitute.For <IObserver>();
        }
Exemplo n.º 2
0
 public PorteFolio(IPortfolioDisplay disp)
 {
     _myDisplay = disp;
 }
Exemplo n.º 3
0
 /// <summary>
 /// The Constructor of the <see cref="Portfolio"/> this initializes the different properties
 /// and implements the given attributes.
 /// </summary>
 /// <param name="name">The name of the portfolio</param>
 /// <param name="portfolioDisplay">The visual output of the portfolio</param>
 public Portfolio(string name, IPortfolioDisplay portfolioDisplay)
 {
     Name             = name;
     Stocks           = new Dictionary <IStock, int>();
     PortfolioDisplay = portfolioDisplay ?? throw new ArgumentNullException(nameof(portfolioDisplay));
 }
Exemplo n.º 4
0
 public Portfolio(string name, IPortfolioDisplay display)
 {
     Name    = name;
     Display = display;
 }