public void Enumerates() { var p = new SearchResultCollectionProxy( new List <SearchResultProxy>() { new SearchResultProxy() }); foreach (var e in (p as IEnumerable)) { Assert.IsType <SearchResultProxy>(e); } }
public void FindAll_ReturnsMappedFromBase() { var first = new SearchResultProxy() { Path = "ou=some,com=path", Properties = new EntryAttributeDictionary() }; var data = new SearchResultCollectionProxy(new List <SearchResultProxy>() { first }); Mock.Get(Searcher.Base) .Setup(m => m.FindAll()) .Returns(data); var results = Searcher.FindAll().ToList(); Mock.Get(Creator).Verify(m => m.Create <TestLdapModel>(first.Properties, first.Path), Times.Once); }
public void ImplicitlyConverts() { SearchResultCollection c = null; SearchResultCollectionProxy p = c; }