public void SenseCustomFieldHasNoValue()
		{
			LexEntry entry = new LexEntry();
			LexSense sense = new LexSense();
			entry.Senses.Add(sense);
			sense.Gloss["analysis"] = "filler";
			sense.GetOrCreateProperty<OptionRef>("customField");
			Assert.AreEqual(true, _missingCustomFieldFilter.FilteringPredicate(entry));
		}
		public void RemoveWord_HasAnotherSense_DisassociatesWordFromDomain()
		{
			LexEntry e = _lexEntryRepository.CreateItem();
			e.LexicalForm.SetAlternative("br", "peixe");
			LexSense s = AddNewSenseToEntry(e);
			s.Gloss.SetAlternative("en", "fish");
			s = new LexSense();
			e.Senses.Add(s);
			OptionRefCollection o =
					s.GetOrCreateProperty<OptionRefCollection>(
							LexSense.WellKnownProperties.SemanticDomainsDdp4);
			o.Add(Task.DomainKeys[0]);
			_lexEntryRepository.SaveItem(e);
			int originalCount = _lexEntryRepository.CountAllItems();

			Task.CurrentDomainIndex = 0;
			Task.DetachFromMatchingEntries("peixe");

			Assert.AreEqual(originalCount, _lexEntryRepository.CountAllItems());
		}
		public void SenseHasCustomField()
		{
			LexEntry entry = new LexEntry();
			LexSense sense = new LexSense();
			entry.Senses.Add(sense);
			OptionRef custom = sense.GetOrCreateProperty<OptionRef>("customField");
			custom.Value = "filler";

			Assert.AreEqual(false, _missingCustomFieldFilter.FilteringPredicate(entry));
		}
		public void RemoveWord_HasOnlyLexemeForm_DeletesWord()
		{
			LexEntry e = _lexEntryRepository.CreateItem();
			e.LexicalForm.SetAlternative("br", "peixe");
			LexSense s = new LexSense();
			e.Senses.Add(s);
			OptionRefCollection o =
					s.GetOrCreateProperty<OptionRefCollection>(
							LexSense.WellKnownProperties.SemanticDomainsDdp4);
			o.Add(Task.DomainKeys[0]);
			_lexEntryRepository.SaveItem(e);
			int originalCount = _lexEntryRepository.CountAllItems();

			Task.CurrentDomainIndex = 0;
			Task.DetachFromMatchingEntries("peixe");

			Assert.AreEqual(originalCount - 1, _lexEntryRepository.CountAllItems());
		}