public void CowboyType_StringValuesRoundTrip_ReturnsOriginalValue() { foreach (var type in CowboyType.All()) { type.ShouldBeSameAs(CowboyType.FromString(type.ToString()), type + " did not round trip successfully"); } }
public void CowboyType_FromNullString_ThrowArgNull() { try { CowboyType.FromString(null); } catch (ArgumentNullException ex) { Console.WriteLine(ex.ToString()); return; } Assert.Fail("Expected exception did not occur"); }
public void CowboyType_FromInvalidString_ThrowArgRange() { try { CowboyType.FromString("Jolly"); } catch (ArgumentOutOfRangeException ex) { Console.WriteLine(ex.ToString()); return; } Assert.Fail("Expected exception did not occur"); }