Beispiel #1
0
        public void SomeIteratorWithNullArgument()
        {
            Action act = () => ReSharper.SuppressUnusedWarning(_instance.SomeIterator(null /*Expect:AssignNullToNotNullAttribute[MIn]*/));

            act.ShouldThrow <ArgumentNullException>("throws immediately => no ForceIteration needed")
            .And.ParamName.Should().Be("str");
        }
Beispiel #2
0
        public void SomeIteratorWithManualNullCheckWithNullArgument()
        {
            Action act =
                () => ReSharper.SuppressUnusedWarning(_instance.SomeIteratorWithManualNullCheck(null /*Expect:AssignNullToNotNullAttribute[MIn]*/));

            act.ShouldNotThrow("no iteration");
        }
Beispiel #3
0
 partial void PartialMethodWithImplementation(string a) => ReSharper.SuppressUnusedWarning(a);
Beispiel #4
0
 public void Method <T>(string a /* no warning */)
 {
     ReSharper.SuppressUnusedWarning(typeof(T));
 }
 public GeneratedCodeOnMember/*Expect:NotNullMemberIsNotInitialized[InclGenCode]*/ (string a)
 {
     ReSharper.SuppressUnusedWarning(a);
 }
 public void Consume()
 {
     ReSharper.SuppressUnusedWarning(ControlInXaml);
 }
 public void ImplicitNotNullRefParameterInInterfaceCanBeNullInDerived(
     [CanBeNull] /*Expect:AnnotationConflictInHierarchy[Implicit]*/ ref string a)
 {
     ReSharper.SuppressUnusedWarning(a);
 }
 public void CanBeNullRefParameterInInterfaceImplicitNotNullInDerived(ref string a /*Expect:ImplicitNotNullConflictInHierarchy[Implicit]*/)
 {
     ReSharper.SuppressUnusedWarning(a);
     a = null;
 }
 public void CanBeNullRefParameterInInterfaceExplicitNotNullInDerived([NotNull] /*Expect:AnnotationConflictInHierarchy*/ ref string a)
 {
     ReSharper.SuppressUnusedWarning(a);
     a = null /*Expect:AssignNullToNotNullAttribute*/;
 }