38 references to ContainsText
System.Windows.Forms (1)
System\Windows\Forms\OLE\DataObject.cs (1)
313public virtual bool ContainsText() => ContainsText(TextDataFormat.UnicodeText);
System.Windows.Forms.Tests (37)
System\Windows\Forms\DataObjectTests.ClipboardTests.cs (10)
124dataObject.ContainsText(TextDataFormat.Text).Should().Be(format == DataFormats.UnicodeText); 125dataObject.ContainsText(TextDataFormat.UnicodeText).Should().Be(format == DataFormats.UnicodeText); 126dataObject.ContainsText(TextDataFormat.Rtf).Should().Be(format == DataFormats.Rtf); 127dataObject.ContainsText(TextDataFormat.Html).Should().Be(format == DataFormats.Html); 128dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().Be(format == DataFormats.CommaSeparatedValue); 184dataObject.ContainsText(TextDataFormat.Text).Should().Be(format == DataFormats.UnicodeText); 185dataObject.ContainsText(TextDataFormat.UnicodeText).Should().Be(format == DataFormats.UnicodeText); 186dataObject.ContainsText(TextDataFormat.Rtf).Should().Be(format == DataFormats.Rtf); 187dataObject.ContainsText(TextDataFormat.Html).Should().Be(format == DataFormats.Html); 188dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().Be(format == DataFormats.CommaSeparatedValue);
System\Windows\Forms\DataObjectTests.cs (27)
149.Setup(o => o.ContainsText(TextDataFormat.UnicodeText)) 153mockDataObject.Verify(o => o.ContainsText(TextDataFormat.UnicodeText), Times.Once()); 161dataObject.ContainsText(format).Should().BeFalse(); 185.Setup(o => o.ContainsText(format)) 191mockDataObject.Object.ContainsText(format).Should().Be(result); 200((Action)(() => dataObject.ContainsText(format))).Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 1205dataObject.ContainsText(TextDataFormat.Text).Should().Be(format == DataFormats.UnicodeText); 1206dataObject.ContainsText(TextDataFormat.UnicodeText).Should().Be(format == DataFormats.UnicodeText); 1207dataObject.ContainsText(TextDataFormat.Rtf).Should().Be(format == DataFormats.Rtf); 1208dataObject.ContainsText(TextDataFormat.Html).Should().Be(format == DataFormats.Html); 1209dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().Be(format == DataFormats.CommaSeparatedValue); 1245dataObject.ContainsText(TextDataFormat.Text).Should().BeFalse(); 1246dataObject.ContainsText(TextDataFormat.UnicodeText).Should().BeFalse(); 1247dataObject.ContainsText(TextDataFormat.Rtf).Should().BeFalse(); 1248dataObject.ContainsText(TextDataFormat.Html).Should().BeFalse(); 1249dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().BeFalse(); 1354dataObject.ContainsText(TextDataFormat.Text).Should().Be(format == DataFormats.UnicodeText); 1355dataObject.ContainsText(TextDataFormat.UnicodeText).Should().Be(format == DataFormats.UnicodeText); 1356dataObject.ContainsText(TextDataFormat.Rtf).Should().Be(format == DataFormats.Rtf); 1357dataObject.ContainsText(TextDataFormat.Html).Should().Be(format == DataFormats.Html); 1358dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().Be(format == DataFormats.CommaSeparatedValue); 1398dataObject.ContainsText(TextDataFormat.Text).Should().BeFalse(); 1399dataObject.ContainsText(TextDataFormat.UnicodeText).Should().BeFalse(); 1400dataObject.ContainsText(TextDataFormat.Rtf).Should().BeFalse(); 1401dataObject.ContainsText(TextDataFormat.Html).Should().BeFalse(); 1402dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().BeFalse(); 1754dataObject.ContainsText(format).Should().BeTrue();