Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((TestGuid.GetHashCode() * 397) ^ (TestString != null ? TestString.GetHashCode() : 0));
     }
 }
Пример #2
0
        public void SyndicationControllerRoutes()
        {
            GetMethod("~/rss").ShouldMapTo <SyndicationController>(c => c.Rss(null, TestGuid.ToString()));
            GetMethod("~/rss/tag-name").ShouldMapTo <SyndicationController>(c => c.Rss("tag-name", TestGuid.ToString()));

            GetMethod("~/rsd").ShouldMapTo <SyndicationController>(c => c.Rsd());

            "~/rss.aspx".ShouldMapTo <SyndicationController>(c => c.LegacyRss());
        }
Пример #3
0
        public void Pack_Guid()
        {
            var obj = new TestGuid {MyGuid = Guid.Empty};

            var res = _packer.Pack(obj);

            Assert.AreEqual(new byte[] {
            0x81, // Map length 1
                0xa6, // Raw length 6
                     0x4d,0x79,0x47,0x75,0x69,0x64, // MyGuid
                0xda,0x00,0x20, // Raw length 32
                     48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,
                     48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48// Guid.Empty
            }, res);
        }
Пример #4
0
        private static void TestInt32Method()
        {
            var a = TestInt32.FromInt32(1);
            var b = TestInt32.FromInt32(1);
            var c = TestInt32.FromInt32(2);
            var d = TestInt32.Parse("3");
            var e = TestInt32.Parse((ReadOnlySpan <char>) "3");

            TestGuid.New();

            Console.WriteLine(d == e);
            Console.WriteLine(a == b);
            Console.WriteLine(a != c);
            Console.WriteLine(b != c);
            Console.WriteLine(b);
        }
Пример #5
0
 protected override string GetCheckFilter()
 {
     return(string.Format("(GCCODE = '{0}')", TestGuid.ToString("N")));
 }
Пример #6
0
 protected bool Equals(TestType other)
 {
     return(TestGuid.Equals(other.TestGuid) && string.Equals(TestString, other.TestString));
 }
Пример #7
0
 protected override string GetCheckFilter()
 {
     return(string.Format("(ARCHINSTGUID = '{0}')", TestGuid.ToString("N")));
 }