public void GetBy_NonExistingId_ThrowsExpcetion() { // arrange var nonExistingId = 99; // act var ex = Assert.Throws <System.InvalidOperationException>(() => conferenceRepository.GetBy(nonExistingId)); // assert Assert.Equal("Sequence contains no elements", ex.Message); }