コード例 #1
0
        public void When_Only_TypeName_Is_Given_Filter_For_All_Types()
        {
            TypeQueryFactory fac = new TypeQueryFactory();
            var queries          = fac.GetQueries("typeName");

            Assert.AreEqual(1, queries.Count);
            TypeQuery tq = queries[0];

            Assert.IsNull(tq.NamespaceFilter);
            Assert.AreEqual(TypeQueryMode.All, tq.SearchMode);
            Assert.AreEqual("typeName", tq.TypeNameFilter);
        }
コード例 #2
0
 public void Can_Query_For_Generic_Type()
 {
     TypeQueryFactory fac = new TypeQueryFactory();
     TypeQuery        tq  = fac.GetQueries("IEnumerable<string>")[0];
     var matchingTypes    = tq.GetTypes(TestConstants.MscorlibAssembly);
 }
コード例 #3
0
        public void Fail_When_Invalid_Modifier_With_TypeName_IsEntered()
        {
            TypeQueryFactory fac = new TypeQueryFactory();

            Assert.Throws <ArgumentException>(() => fac.GetQueries("xxx typeName"));
        }