public void TypeFinder_Second_Call_Returns_Same_Values_As_First() { // It can take low-order hundreds of milliseconds to return all types. This // doesn't affect real-world use where searches for web API controllers are // seldom made but it hammers unit tests. // // To that end the type finder implementation is at liberty to cache results // for a short period of time. This just checks that two calls made quickly // after each other contain the same types. var typeFinder = Factory.Resolve <ITypeFinder>(); var results1 = typeFinder.GetAllTypes().ToArray(); var results2 = typeFinder.GetAllTypes().ToArray(); Assertions.AreContentsSameUnordered(results1, results2); }