public void Set_Found_ChangesToValue() { var memory = new TaskMemory(); memory.Set("color", "orange"); memory.Set("color", "red"); Assert.AreEqual("red", memory.Get("color", "blue")); }
void OnSelectedEntryOfDictionaryControlChanged(object sender, EventArgs e) { LexEntry entry = _dictionaryControl.CurrentEntry; if (entry != null) { _taskMemory.Set(LastUrlKey, _dictionaryControl.CurrentUrl); } }
public void GetInt_NotReallyAnInteger_GivesDefaultValue() { var memory = new TaskMemory(); memory.Set("number", "blue"); Assert.AreEqual(3, memory.Get("number", 3)); }
public void Get_Found_GivesCorrectValue() { var memory = new TaskMemory(); memory.Set("color", "blue"); Assert.AreEqual("blue", memory.Get("color", "red")); }
private void RecordLocationInTaskMemory() { _taskMemory.Set(DomainIndexTaskMemoryKey, _currentDomainIndex); _taskMemory.Set(QuestionIndexTaskMemoryKey, _currentQuestionIndex); }