public void DeactivateMemoryBuffer_SetsActive_ForBlock_False() { // arrange uint bufferId; _manager.AllocateMemoryBuffer(100, out bufferId); Assert.AreEqual(1, _manager.GetBlocks.Count); Assert.IsTrue(_manager.GetBlocks.First().Active); // act _manager.DeactivateMemoryBuffer(bufferId); // assert Assert.IsFalse(_manager.GetBlocks.First().Active); }
public void AllocateMemoryBuffer_WhenManagerNotInitialised_Ignored_OK() { using (var manager = new MemoryManager()) { // not initialised // arrange // act & assert Assert.That(() => manager.AllocateMemoryBuffer(100, out _), Throws.Nothing); } }