Example #1
0
 public void CowboyType_StringValuesRoundTrip_ReturnsOriginalValue()
 {
     foreach (var type in CowboyType.All())
     {
         type.ShouldBeSameAs(CowboyType.FromString(type.ToString()), type + " did not round trip successfully");
     }
 }
Example #2
0
        public void CowboyType_FromNullString_ThrowArgNull()
        {
            try
            {
                CowboyType.FromString(null);
            }
            catch (ArgumentNullException ex)
            {
                Console.WriteLine(ex.ToString());
                return;
            }

            Assert.Fail("Expected exception did not occur");
        }
Example #3
0
        public void CowboyType_FromInvalidString_ThrowArgRange()
        {
            try
            {
                CowboyType.FromString("Jolly");
            }
            catch (ArgumentOutOfRangeException ex)
            {
                Console.WriteLine(ex.ToString());
                return;
            }

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