public static Scope ToModel(this ScopeDocument s) { if (s == null) { return(null); } return(Mapper.Map <ScopeDocument, Scope>(s)); }
public void TestScopeDocumentConstructor() { var document1 = new ScopeDocument(_dictionary); var document2 = new ScopeDocument(_hashtable); var document3 = new ScopeDocument(_idictionaryNonGeneric); var document4 = new ScopeDocument(_idictionary); Assert.AreEqual("Dictionary<string, object>", document1["type"].AsString); Assert.AreEqual("Hashtable", document2["type"].AsString); Assert.AreEqual("IDictionary", document3["type"].AsString); Assert.AreEqual("IDictionary<string, object>", document4["type"].AsString); }