Пример #1
0
 public void CowboyType_DbValuesRoundTrip_ReturnsOriginalValue()
 {
     foreach (var type in CowboyType.All())
     {
         type.ShouldBeSameAs(CowboyType.FromDbValue(type.ToDbValue()), type + " did not round trip successfully");
     }
 }
Пример #2
0
        public void CowboyType_FromNullDbValue_ThrowArgNull()
        {
            try
            {
                CowboyType.FromDbValue(null);
            }
            catch (ArgumentNullException ex)
            {
                Console.WriteLine(ex.ToString());
                return;
            }

            Assert.Fail("Expected exception did not occur");
        }
Пример #3
0
        public void CowboyType_FromInvalidDbValue_ThrowArgRange()
        {
            try
            {
                CowboyType.FromDbValue("Good");
            }
            catch (ArgumentOutOfRangeException ex)
            {
                Console.WriteLine(ex.ToString());
                return;
            }

            Assert.Fail("Expected exception did not occur");
        }