public void GetHoldingAtDateStockNotFound() { var portfolio = PortfolioTestCreator.CreateDefaultPortfolio(); var service = new PortfolioHoldingService(portfolio); var result = service.GetHolding(Guid.NewGuid(), new Date(2000, 01, 01)); result.Should().HaveNotFoundStatus(); }
public void GetHoldingAtDate() { var portfolio = PortfolioTestCreator.CreateDefaultPortfolio(); var service = new PortfolioHoldingService(portfolio); var result = service.GetHolding(PortfolioTestCreator.Stock_ARG.Id, new Date(2000, 01, 01)); result.Result.Should().BeEquivalentTo(new RestApi.Portfolios.Holding() { Stock = PortfolioTestCreator.Stock_ARG, Units = 100, Value = 100.00m, Cost = 119.95m, CostBase = 119.95m, }); }