ExactlyOne extension method
Q&amp;A


  Is the code readable?



ExactlyOne states very clearly what the method is supposed to do.
source is null seems odd to me (does that even compile?). I'd prefer source == null. (Edit from comments: a topic about is null vs == null)
IEnumerator&lt;TSource&gt; enumerator = source.GetEnumerator() can be written as var enumerator = source.GetEnumerator().





  Is the code maintainable?



Since you are looking for a sibling function of Any&lt;T&gt;(), I would also include a ExactlyOne&lt;T&gt;(Func&lt;T, bool&gt; predicate).





  Is the code performant?



It does seem so, right? But notice that LINQ is optimized for IEnumerable&lt;T&gt; that is also ICollection&lt;T&gt;, in which case Count is used. Implementations should have an eager implementation of this property. Your method could also use this optimization Count == 1. 
I actually noticed (in my eyes) unexpected behavior in LINQ: Count&lt;T&gt;() is optimized for ICollection&lt;T&gt; but Any&lt;T() is not. This means you arguably could make a slightly faster implementation than LINQ. 
An in-depth comparison is required to find the most optimized approach. As discussed in the comments, testing the different implementations against a variety of input sources should yield us which method perfoms best under which conditions.





  Do the tests cover the expected cases or are there more to consider?


You cover null, empty, 1, multiple, early exit on infinite.. but perhaps also test on ICollection&lt;T&gt; and custom IEnumerable&lt;T&gt; implementations with eager and/or lazy loading.



Reference Source: LINQ Any vs Count

// not optimized for ICollection&lt;T&gt; (why ??)
public static bool Any&lt;TSource&gt;(this IEnumerable&lt;TSource&gt; source) {
    if (source == null) throw Error.ArgumentNull("source");
    using (IEnumerator&lt;TSource&gt; e = source.GetEnumerator()) {
        if (e.MoveNext()) return true;
    }
    return false;
}

public static bool Any&lt;TSource&gt;(this IEnumerable&lt;TSource&gt; source, Func&lt;TSource, bool&gt; predicate) {
    if (source == null) throw Error.ArgumentNull("source");
    if (predicate == null) throw Error.ArgumentNull("predicate");
    foreach (TSource element in source) {
        if (predicate(element)) return true;
    }
    return false;
}

// optimized for ICollection&lt;T&gt;
public static int Count&lt;TSource&gt;(this IEnumerable&lt;TSource&gt; source) {
    if (source == null) throw Error.ArgumentNull("source");
    ICollection&lt;TSource&gt; collectionoft = source as ICollection&lt;TSource&gt;;
    if (collectionoft != null) return collectionoft.Count;
    ICollection collection = source as ICollection;
    if (collection != null) return collection.Count;
    int count = 0;
    using (IEnumerator&lt;TSource&gt; e = source.GetEnumerator()) {
        checked {
            while (e.MoveNext()) count++;
        }
    }
    return count;
}