Beispiel #1
0
        public void SetValueThrowsNoExceptionIfKeyDoesNotExist()
        {
            // Arrange
            var savegame = new Savegame("123/456".ToValidSavegameString());
            const int invalidKey = 1000;

            // Act
            Action a = () => savegame.SetValue(invalidKey, 0);

            // Assert
            a.ShouldNotThrow<Exception>();
        }
Beispiel #2
0
        public void SetValueSfChangesValue()
        {
            // Arrange
            var savegame = new Savegame("123/456".ToValidSavegameString());
            const SF validKey = (SF) 2;
            var oldValue = savegame.GetValue(validKey); // 456

            // Act
            savegame.SetValue(validKey, 0);

            // Assert
            var newValue = savegame.GetValue(validKey);
            newValue.Should().NotBe(oldValue);
        }