public void Temp_Test_For_New_Config_Values() { var xml_reader = new MyXmlReader(); Assert.AreEqual(xml_reader.Read_xml($"{nameof(TestSheetNames)}.{nameof(TestSheetNames.Cred_card1)}"), "CredCard1"); Assert.AreEqual(xml_reader.Read_xml($"{nameof(TestSheetNames)}.{nameof(TestSheetNames.Test_record)}"), "TestRecord"); Assert.AreEqual(xml_reader.Read_xml($"{nameof(TestSheetNames)}.{nameof(TestSheetNames.Cred_card)}"), "CredCard"); Assert.AreEqual(xml_reader.Read_xml($"{nameof(TestSheetNames)}.{nameof(TestSheetNames.Bank)}"), "Bank"); Assert.AreEqual(xml_reader.Read_xml($"{nameof(TestSheetNames)}.{nameof(TestSheetNames.Actual_bank)}"), "ActualBank"); Assert.AreEqual(xml_reader.Read_xml($"{nameof(TestSheetNames)}.{nameof(TestSheetNames.Bad_divider)}"), "BadDivider"); Assert.AreEqual(xml_reader.Read_xml($"{nameof(TestSheetNames)}.{nameof(TestSheetNames.Budget_out)}"), "Budget Out"); Assert.AreEqual(xml_reader.Read_xml($"{nameof(TestSheetNames)}.{nameof(TestSheetNames.Expected_out)}"), "Expected Out"); }
public void Can_Read_Path_From_Config() { var xml_reader = new MyXmlReader(); Assert.AreEqual("This value should always be this string.", xml_reader.Read_xml(nameof(ReconConsts.Test_value_do_not_change), _sample_xml_config_file_path)); }
public void Temp_Test_For_New_Config_Values(string element_name, string element_value) { var xml_reader = new MyXmlReader(); Assert.AreEqual(element_value, xml_reader.Read_xml(element_name, _sample_xml_config_file_path)); }
public void Temp_Test_For_New_Config_Values_With_Compound_Names() { var xml_reader = new MyXmlReader(); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Budget_out)}", _sample_xml_config_file_path), "Budget Out", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Budget_in)}", _sample_xml_config_file_path), "Budget In", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Expected_out)}", _sample_xml_config_file_path), "Expected Out", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Expected_in)}", _sample_xml_config_file_path), "Expected In", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Totals)}", _sample_xml_config_file_path), "Totals", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Savings)}", _sample_xml_config_file_path), "Savings", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Bank_out)}", _sample_xml_config_file_path), "Bank Out", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Bank_in)}", _sample_xml_config_file_path), "Bank In", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Cred_card1)}", _sample_xml_config_file_path), "CredCard1", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Cred_card2)}", _sample_xml_config_file_path), "CredCard2", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(MainSheetNames)}.{nameof(MainSheetNames.Cred_card3)}", _sample_xml_config_file_path), "CredCard3", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Divider_text)}", _sample_xml_config_file_path), "divider", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Expenses)}", _sample_xml_config_file_path), "Expenses", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Expenses_total)}", _sample_xml_config_file_path), "Expenses Total", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Sodds)}", _sample_xml_config_file_path), "SODDs", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Cred_card1)}", _sample_xml_config_file_path), "CredCard1 cred card", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Cred_card2)}", _sample_xml_config_file_path), "CredCard2 cred card", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.SODD_total)}", _sample_xml_config_file_path), "SODDTotal", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Annual_sodds)}", _sample_xml_config_file_path), "AnnualSODDs", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Annual_total)}", _sample_xml_config_file_path), "AnnualTotal", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Date)}", _sample_xml_config_file_path), "Date", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(Dividers)}.{nameof(Dividers.Total)}", _sample_xml_config_file_path), "Total", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(PocketMoneySheetNames)}.{nameof(PocketMoneySheetNames.Second_child)}", _sample_xml_config_file_path), "SecondChild", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(PlanningSheetNames)}.{nameof(PlanningSheetNames.Expenses)}", _sample_xml_config_file_path), "Expenses", _sample_xml_config_file_path); Assert.AreEqual(xml_reader.Read_xml($"{nameof(PlanningSheetNames)}.{nameof(PlanningSheetNames.Deposits)}", _sample_xml_config_file_path), "Deposits", _sample_xml_config_file_path); }
public void All_Config_Values_Should_Be_In_Config(string element_name, string element_value) { var xml_reader = new MyXmlReader(); Assert.AreEqual(element_value, xml_reader.Read_xml(element_name, _sample_xml_config_file_path)); }