//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void does_not_warn_against_restricted_injected_types_when_warnings_are_suppressed() public virtual void DoesNotWarnAgainstRestrictedInjectedTypesWhenWarningsAreSuppressed() { ContextFieldVisitor contextFieldVisitor = new ContextFieldVisitor(CompilationRule.Types, CompilationRule.Elements, true); Stream <VariableElement> fields = _elementTestUtils.getFields(typeof(RestrictedContextTypes)); Stream <CompilationMessage> result = fields.flatMap(contextFieldVisitor.visit); assertThat(result).Empty; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void rejects_unsupported_injected_type_when_warnings_are_suppressed() public virtual void RejectsUnsupportedInjectedTypeWhenWarningsAreSuppressed() { ContextFieldVisitor contextFieldVisitor = new ContextFieldVisitor(CompilationRule.Types, CompilationRule.Elements, true); Stream <VariableElement> fields = _elementTestUtils.getFields(typeof(UnknownContextType)); Stream <CompilationMessage> result = fields.flatMap(contextFieldVisitor.visit); //JAVA TO C# CONVERTER TODO TASK: Method reference arbitrary object instance method syntax is not converted by Java to C# Converter: assertThat(result).extracting(CompilationMessage::getCategory, CompilationMessage::getContents).containsExactly(_unknownContextErrorMsg); }