private void GetCandidatePresenterTypeFullNameFormatsTest(ConventionBasedPresenterDiscoveryStrategy conventionBasedPresenterDiscoveryStrategy, Mock<IType> typeMock, string viewTypeNamespace, string expectedFirstCandidatePresenterTypeFullNameFormat) { typeMock.Setup(type => type.Namespace).Returns(viewTypeNamespace); IEnumerable<string> actualCandidatePresenterTypeFullNameFormats = conventionBasedPresenterDiscoveryStrategy.GetCandidatePresenterTypeFullNameFormats(typeMock.Object); // ReSharper disable PossibleMultipleEnumeration Assert.IsTrue(actualCandidatePresenterTypeFullNameFormats.Count() == this._originalCandidatePresenterTypeFullNameFormats.Count() + 1); Assert.AreEqual(expectedFirstCandidatePresenterTypeFullNameFormat, actualCandidatePresenterTypeFullNameFormats.ElementAt(0)); for(int i = 0; i < this._originalCandidatePresenterTypeFullNameFormats.Count(); i++) { Assert.AreEqual(this._originalCandidatePresenterTypeFullNameFormats.ElementAt(i), actualCandidatePresenterTypeFullNameFormats.ElementAt(i + 1)); } // ReSharper restore PossibleMultipleEnumeration }
private static void GetCandidatePresenterTypeFullNameFormatFromViewTypeNamespaceTest(ConventionBasedPresenterDiscoveryStrategy conventionBasedPresenterDiscoveryStrategy, Mock<IType> typeMock, string viewTypeNamespace, string expectedCandidatePresenterTypeFullNameFormat) { typeMock.Setup(type => type.Namespace).Returns(viewTypeNamespace); Assert.AreEqual(expectedCandidatePresenterTypeFullNameFormat, conventionBasedPresenterDiscoveryStrategy.GetCandidatePresenterTypeFullNameFormatFromViewTypeNamespace(typeMock.Object)); }