public void test_BuildAdress_FSwitch() { //Arrange AGC agc = new AGC("TestFile.agc", chan); short bit_adr = 0x401; short expected = 1; agc.RegBank.set_hex(0, bit_adr); //act agc.build_adress_reg(agc.RegBank.get_sword(0)); short actual = agc.RegBank.get_word(12); //assert Assert.AreEqual(expected, actual); }
public void test_fFixed_switch() { //Arrange AGC agc = new AGC("TestFile.agc", chan); short adr = 0x801; int expected_bank = 2; //act agc.fFixed_switch(adr); int bid = agc.PB.getId(); bool fix = agc.PB.isErasable(); //assert Assert.AreEqual(expected_bank, bid); Assert.AreEqual(fix, false); }
public void test_BuildAdress_EFixed() { //Arrange AGC agc = new AGC("TestFile.agc", chan); short bit_adr = 0x101; short expected = 0x101; agc.RegBank.set_hex(0, bit_adr); //act agc.build_adress_reg(agc.RegBank.get_sword(0)); short actual = agc.RegBank.get_word(12); short actual_EB = agc.RegBank.get_word(3); //assert Assert.AreEqual(expected, actual); Assert.AreEqual(true, agc.fFixed); }