Example #1
0
        public void GetTransactionNotFound()
        {
            var portfolio = PortfolioTestCreator.CreateDefaultPortfolio();

            var service = new PortfolioTransactionService(portfolio, null);

            var result = service.GetTransaction(Guid.NewGuid());

            result.Should().HaveNotFoundStatus();
        }
Example #2
0
        public void GetTransaction()
        {
            var portfolio = PortfolioTestCreator.CreateDefaultPortfolio();

            var service = new PortfolioTransactionService(portfolio, null);

            var id     = portfolio.Transactions[1].Id;
            var result = service.GetTransaction(id);

            result.Result.Should().BeEquivalentTo(new
            {
                Stock           = PortfolioTestCreator.Stock_ARG.Id,
                Id              = id,
                Type            = TransactionType.Aquisition,
                TransactionDate = new Date(2000, 01, 01),
                Description     = "Aquired 100 shares @ $1.00"
            });
        }