public void TestGetOtherFundsType() { string binationalCommission = "commission"; string personal = "peronsal"; string evGovt = "ev gov"; Other other = new Other("name", "amount"); USGovernmentFunding usGovt = new USGovernmentFunding(null, null, null, null, null, null); InternationalFunding international = new InternationalFunding(null, null, null, null, null, null); var otherFunds = new OtherFunds( exchangeVisitorGovernment: evGovt, binationalCommission: binationalCommission, personal: personal, usGovernmentFunding: usGovt, internationalFunding: international, other: other); var instance = otherFunds.GetOtherFundsType(); Assert.IsNotNull(instance); Assert.AreEqual(otherFunds.BinationalCommission, instance.BinationalCommission); Assert.AreEqual(otherFunds.ExchangeVisitorGovernment, instance.EVGovt); Assert.AreEqual(otherFunds.Personal, instance.Personal); Assert.IsNotNull(otherFunds.InternationalFunding); Assert.IsNotNull(otherFunds.Personal); Assert.IsNotNull(otherFunds.USGovernmentFunding); }
public void TestGetOtherFundsType_NullOther() { string binationalCommission = "commission"; string personal = "peronsal"; string evGovt = "ev gov"; Other other = null; USGovernmentFunding usGovt = new USGovernmentFunding(null, null, null, null, null, null); InternationalFunding international = new InternationalFunding(null, null, null, null, null, null); var otherFunds = new OtherFunds( exchangeVisitorGovernment: evGovt, binationalCommission: binationalCommission, personal: personal, usGovernmentFunding: usGovt, internationalFunding: international, other: other); var instance = otherFunds.GetOtherFundsType(); Assert.IsNotNull(instance); Assert.IsNull(otherFunds.Other); }