public void Contains_can_restrict_speech_to_specific_speaker() { var source = new SpeechJournalSource(); var journal = new SpeechJournal(source, null); source.AddMessage("name", "same message", new ObjectId(1), 0); journal.Contains(1, "same message").Should().BeTrue(); journal.Contains(0, "same message").Should().BeFalse(); }
public void Contains_checks_whole_message_including_speaker_name() { var source = new SpeechJournalSource(); var journal = new SpeechJournal(source, null); source.AddMessage("name", "this is an AfK check", new ObjectId(0), 0); journal.Contains("name: this").Should().BeTrue(); }
public void Contains_returns_false_if_journal_doesnt_contains_string() { var source = new SpeechJournalSource(); var journal = new SpeechJournal(source, null); source.AddMessage("name", "this is an AfK check", new ObjectId(0), 0); journal.Contains("and now for completely something else").Should().BeFalse(); }
public void Can_see_entries_received_after_journal_instantiation() { var source = new SpeechJournalSource(); var journal = new SpeechJournal(source, null); source.AddMessage("name", "message after instantiation", new ObjectId(0), 0); journal.Contains("message after instantiation").Should().BeTrue(); }
public void Contains_is_case_insensitive_by_default() { var source = new SpeechJournalSource(); var journal = new SpeechJournal(source, null); source.AddMessage("name", "this is an AfK check", new ObjectId(0), 0); journal.Contains("afk").Should().BeTrue(); }
public void Contains_cannot_see_entry_received_before_journal_deletion() { var source = new SpeechJournalSource(); var journal = new SpeechJournal(source, null); source.AddMessage("name", "message before delete", new ObjectId(0), 0); journal.Delete(); journal.Contains("message before delete").Should().BeFalse(); }
public void Cannot_see_entries_received_before_journal_instantiation() { var source = new SpeechJournalSource(); source.AddMessage("name", "message before instantiation", new ObjectId(0), 0, (Color)0); var journal = new SpeechJournal(source, null); journal.Contains("message before instantiation").Should().BeFalse(); }
public void Can_see_entry_received_after_journal_deletion() { var source = new SpeechJournalSource(); var journal = new SpeechJournal(source, null); source.AddMessage("name", "first message", new ObjectId(0), 0); journal.Delete(); source.AddMessage("name", "message after delete", new ObjectId(0), 0); journal.Contains("message after delete").Should().BeTrue(); }
public void ContainsWithFullJournal() { fullJournal.Contains("something that is not really in journal"); }
public void ContainsWithEmptyJournal() { emptyJournal.Contains("some other name"); }