Beispiel #1
0
        public void StoreAndRetrieveIntegerValue()
        {
            var t_Memory = new MemoryUnit(4);

            t_Memory.Store(10);
            var t_Value = t_Memory.Load <int>();

            t_Value.Should().Be(10, "We stored the number 10.");
        }
Beispiel #2
0
        public void LoadFromInitializedUnit()
        {
            Action t_NoThrow = () =>
            {
                var t_Memory = new MemoryUnit(4);
                var t_Value  = t_Memory.Load <int>();
            };

            t_NoThrow.Should().NotThrow("MemoryUnit should self-initialize with enough memory to hold specified size.");
        }