コード例 #1
0
        public void throw_no_state_value_found_exception_when_adding_and_then_remove_state_value_doesnt_exist()
        {
            var stateValueManager = new StateValueManagement();

            stateValueManager.AddStateValue(new StateValue("sentinel1", "package1", "statename", 3, TypeOfValue.Int));
            Check.ThatCode(() => stateValueManager.RemoveStateValueByKey("sentinel2", "package1", "statename"))
            .Throws <NoStateValueFoundException>();
        }
コード例 #2
0
        public void return_0_when_adding_and_then_remove_state_value()
        {
            var stateValueManager = new StateValueManagement();

            stateValueManager.AddStateValue(new StateValue("sentinel1", "package1", "statename", 3, TypeOfValue.Int));
            stateValueManager.RemoveStateValueByKey("sentinel1", "package1", "statename");
            Check.That(stateValueManager.GetAllStateValues().Count).IsEqualTo(0);
        }