public void CreateStatement_ExpectValid() { //Arrange string localStatementIdString = "STMT01"; StatementId localStatementId = new StatementId(localStatementIdString); SpecificFieldsFactory localfactory = new SpecificFieldsFactory(); string[] listspecificfields = { "Credit Card", "12" }; StatementType localStatementType = new StatementType(localfactory, "CreditCardProvider", listspecificfields); StatementSpecificFields localspecificfields = localStatementType.getSpecificFields(); int localstatementAccountnumber = 1234567; string localstatementAccountholdername = "Bruce"; DateTime localstatementDate = DateTime.Now; StatementCommonFields localStatementCommonFields = new StatementCommonFields(localstatementAccountnumber, localstatementAccountholdername, localstatementDate); APSUser localAPSUser = new APSUser(new APSUserId("1"), "testusername", "testpassword"); BillingAccount localBillingAccount = new BillingAccount(new BillingAccountId("1"), new BillingCompanyId("1"), "testusername", "testpassword", localAPSUser); //Act Statement localStatement = new Statement(localStatementId, localStatementCommonFields, localStatementType, localspecificfields, localAPSUser, localBillingAccount); //Assert Assert.AreEqual(localStatement.StatementId, localStatementId); Assert.AreEqual(localStatement.StatementCommonFields, localStatementCommonFields); Assert.AreEqual(localStatement.StatementType, localStatementType); Assert.AreEqual(localStatement.StatementSpecificFields, localspecificfields); Assert.AreEqual(localStatement.APSUser, localAPSUser); Assert.AreEqual(localStatement.BillingAccount, localBillingAccount); }
public void CreateStatement_ExpectValid() { //Arrange string localStatementIdString = "STMT01"; StatementId localStatementId = new StatementId(localStatementIdString); SpecificFieldsFactory localfactory = new SpecificFieldsFactory(); string[] listspecificfields = { "Credit Card", "12" }; StatementType localStatementType = new StatementType(localfactory, "CreditCardProvider", listspecificfields); StatementSpecificFields localspecificfields = localStatementType.getSpecificFields(); int localstatementAccountnumber = 1234567; string localstatementAccountholdername = "Bruce"; DateTime localstatementDate = DateTime.Now; StatementCommonFields localStatementCommonFields = new StatementCommonFields(localstatementAccountnumber, localstatementAccountholdername, localstatementDate); APSUser localAPSUser = new APSUser(new APSUserId("1"), "testusername", "testpassword"); BillingAccount localBillingAccount = new BillingAccount(new BillingAccountId("1"), new BillingCompanyId("1"), "testusername", "testpassword", localAPSUser); //Act Statement localStatement = new Statement(localStatementId, localStatementCommonFields, localStatementType, localspecificfields, localAPSUser, localBillingAccount); //Assert Assert.AreEqual(localStatement.StatementId, localStatementId); Assert.AreEqual(localStatement.StatementCommonFields, localStatementCommonFields); Assert.AreEqual(localStatement.StatementType, localStatementType); Assert.AreEqual(localStatement.StatementSpecificFields, localspecificfields); Assert.AreEqual(localStatement.APSUser, localAPSUser); Assert.AreEqual(localStatement.BillingAccount, localBillingAccount); }
public void CreateStatementSpecificFields_ExpectValid() { //Arrange SpecificFieldsFactory localfactory = new SpecificFieldsFactory(); string[] listspecificfields = { "You will need to pay by the 25th on the month", "1000" }; StatementType localStatementType = new StatementType(localfactory, "Municipality", listspecificfields); StatementSpecificFields localspecificfields = localStatementType.getSpecificFields(); //Assert Assert.IsNotNull(localspecificfields); }
public void CreateStatementSpecificFields_ExpectValid() { //Arrange SpecificFieldsFactory localfactory = new SpecificFieldsFactory(); string[] listspecificfields = { "You will need to pay by the 25th on the month", "1000" }; StatementType localStatementType = new StatementType(localfactory, "Municipality", listspecificfields); StatementSpecificFields localspecificfields = localStatementType.getSpecificFields(); //Assert Assert.IsNotNull(localspecificfields); }