public void Add_should_add_using_full_type_name()
        {
            var t    = new NamedObjectCollection <UriParser>();
            var item = new HttpStyleUriParser();

            t.Add(item);

            Assert.Same(item, t["System.HttpStyleUriParser"]);
        }
예제 #2
0
 public Bien(int id, DateTime dateCreation, string nom, int idProprietaire, HttpStyleUriParser image, Proprietaire proprietaire)
 {
     Id             = id;
     DateCreation   = dateCreation;
     Nom            = nom;
     IdProprietaire = idProprietaire;
     Image          = image;
     Proprietaire   = proprietaire;
 }
        public void Add_should_add_using_implicit_and_explicit_names()
        {
            var t    = new NamedObjectCollection <UriParser>();
            var item = new HttpStyleUriParser();

            t.Add("http", item);

            Assert.Same(item, t["System.HttpStyleUriParser"]);
            Assert.Same(item, t["http"]);
        }
예제 #4
0
        public void TestToString04()
        {
            Northwind db = CreateDB();
            object    strangeObject4Sql = new HttpStyleUriParser();
            var       query             = from e in db.OrderDetails
                                          where e.Discount.ToString() == strangeObject4Sql.ToString()
                                          select e;

            var list = query.ToList();
        }
        public void Add_should_allow_multiple_with_same_implicit_name()
        {
            var t     = new NamedObjectCollection <UriParser>();
            var item1 = new HttpStyleUriParser();
            var item2 = new HttpStyleUriParser();

            t.Add(item1);
            t.Add(item2);

            Assert.HasCount(2, t);
        }
        public void Add_should_not_use_implicit_name_on_second_instance()
        {
            var t     = new NamedObjectCollection <UriParser>();
            var item1 = new HttpStyleUriParser();
            var item2 = new HttpStyleUriParser();

            t.Add(item1);
            t.Add(item2);

            Assert.Equal(new [] { "System.HttpStyleUriParser" }, t.GetNames(item1));
            Assert.Empty(t.GetNames(item2));
        }
예제 #7
0
        static void Main(string[] args)
        {
            var human = new Human()
            {
                FirstName  = "John",
                MiddleName = "Iben",
                LastName   = "Doe"
            };

            Console.WriteLine("Hello World!");
            Console.WriteLine(human.type);
            WriteColored(human.FullName, ConsoleColor.DarkYellow);

            HttpStyleUriParser parser = new HttpStyleUriParser();

            WriteColored(parser.ToString(), ConsoleColor.Red);
            WriteColored(parser.GetType().ToString(), ConsoleColor.Magenta);

            TestIntParse();
        }
예제 #8
0
 public static void HttpStyleUriParser_ctor()
 {
     HttpStyleUriParser httpParser = new HttpStyleUriParser();
 }
 public void Deny_Unrestricted()
 {
     HttpStyleUriParser parser = new HttpStyleUriParser();
     // everything else is protected
 }
예제 #10
0
 public static void HttpStyleUriParser_ctor()
 {
     HttpStyleUriParser httpParser = new HttpStyleUriParser();
 }