Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

339
Vistas
FluentAssertions: Assert that a collection contains any item that contains a string (case insensitive)

I have a collection of strings

var greetings = new[] { "Hello boy", "Hello girl", "Hello all"};

I would like to create an assertion using FluentAssertions that verifies that the collection contains at least one item that contains a given string.

Example. For the previous collection,

  • testing with "boy", should pass.
  • testing with "Girl" should pass.
  • testing with "hello" should pass.
  • testing with "ouch" should NOT pass (because there is not item in the collection that contains this string).

I've tried with:

greetings.Should().ContainMatch("*" + str + "*");

But it doesn't work becuase it's case sensitive.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda