public void TestGetMoneyFlow_CheckSourceAndRecipientEntityId_Office()
        {
            var sourceEntityId        = 1;
            var recipientEntityId     = 2;
            var sourceEntityTypeId    = MoneyFlowSourceRecipientType.Office.Id;
            var recipientEntityTypeId = MoneyFlowSourceRecipientType.Office.Id;
            var userId            = 1;
            var user              = new User(userId);
            var description       = "description";
            var value             = 1.00m;
            var fiscalYear        = 2015;
            var transactionDate   = DateTimeOffset.UtcNow;
            var moneyFlowStatusId = MoneyFlowStatus.Appropriated.Id;
            var parentMoneyFlowId = 5;
            var grantNumber       = "grant";
            var isDirect          = true;
            var instance          = new AdditionalMoneyFlow(user, parentMoneyFlowId, description, grantNumber, value, moneyFlowStatusId, transactionDate, fiscalYear, sourceEntityId, recipientEntityId, sourceEntityTypeId, recipientEntityTypeId, isDirect);

            var moneyFlow = instance.GetMoneyFlow();

            Assert.AreEqual(sourceEntityId, moneyFlow.SourceOrganizationId);
            Assert.AreEqual(recipientEntityId, moneyFlow.RecipientOrganizationId);

            nullablePropertyTester(x => x.SourceParticipantId, moneyFlow);
            nullablePropertyTester(x => x.SourceProgramId, moneyFlow);
            nullablePropertyTester(x => x.SourceProjectId, moneyFlow);
            nullablePropertyTester(x => x.SourceItineraryStopId, moneyFlow);

            nullablePropertyTester(x => x.RecipientItineraryStopId, moneyFlow);
            nullablePropertyTester(x => x.RecipientProgramId, moneyFlow);
            nullablePropertyTester(x => x.RecipientProjectId, moneyFlow);
            nullablePropertyTester(x => x.RecipientParticipantId, moneyFlow);
            nullablePropertyTester(x => x.RecipientTransportationId, moneyFlow);
            nullablePropertyTester(x => x.RecipientAccommodationId, moneyFlow);
        }
        public void TestGetMoneyFlow_CheckBasicProperties()
        {
            var sourceEntityId        = 1;
            var recipientEntityId     = 2;
            var sourceEntityTypeId    = MoneyFlowSourceRecipientType.TravelStop.Id;
            var recipientEntityTypeId = MoneyFlowSourceRecipientType.Organization.Id;
            var userId            = 1;
            var user              = new User(userId);
            var description       = "description";
            var value             = 1.00m;
            var fiscalYear        = 2015;
            var transactionDate   = DateTimeOffset.UtcNow;
            var moneyFlowStatusId = MoneyFlowStatus.Appropriated.Id;
            var parentMoneyFlowId = 5;
            var grantNumber       = "grant";
            var isDirect          = true;
            var instance          = new AdditionalMoneyFlow(user, parentMoneyFlowId, description, grantNumber, value, moneyFlowStatusId, transactionDate, fiscalYear, sourceEntityId, recipientEntityId, sourceEntityTypeId, recipientEntityTypeId, isDirect);

            var moneyFlow = instance.GetMoneyFlow();

            Assert.AreEqual(description, moneyFlow.Description);
            Assert.AreEqual(value, moneyFlow.Value);
            Assert.AreEqual(fiscalYear, moneyFlow.FiscalYear);
            Assert.AreEqual(transactionDate, moneyFlow.TransactionDate);
            Assert.AreEqual(moneyFlowStatusId, moneyFlow.MoneyFlowStatusId);
            Assert.AreEqual(sourceEntityId, moneyFlow.SourceItineraryStopId);
            Assert.AreEqual(recipientEntityId, moneyFlow.RecipientOrganizationId);
            Assert.AreEqual(userId, moneyFlow.History.CreatedBy);
            Assert.AreEqual(userId, moneyFlow.History.RevisedBy);
            Assert.AreEqual(parentMoneyFlowId, moneyFlow.ParentMoneyFlowId);
            Assert.AreEqual(grantNumber, moneyFlow.GrantNumber);
            Assert.AreEqual(isDirect, moneyFlow.IsDirect);
            DateTimeOffset.UtcNow.Should().BeCloseTo(moneyFlow.History.CreatedOn, 2000);
            DateTimeOffset.UtcNow.Should().BeCloseTo(moneyFlow.History.RevisedOn, 2000);
            Assert.AreEqual(MoneyFlowType.Incoming.Id, moneyFlow.MoneyFlowTypeId);
        }