public void AttachNewBank() { var t_Address = m_Service.Attach(new MemoryBank(64)); var t_Bank = m_Service.ResolveAddress(t_Address); t_Bank.Should().NotBeNull(); t_Bank.Size.Should().Be(64); }
public void ReadUntilInvalidMemory() { var t_OpBank = new MemoryBank(1); m_BankService.Attach(t_OpBank); m_BankService.ResolveAddress(new MemoryBankAddress(0)).Store(1, new MemoryAddress(4)); m_Fetcher.SetFetchFromAddress(new MemoryAddress(0), new MemoryBankAddress(0)); Action t_InvalidMemory = () => { m_Fetcher.FetchOperation(); m_Fetcher.FetchOperation(); m_Fetcher.FetchOperation(); }; t_InvalidMemory.Should().Throw <AddressOutOfRange>(); }