public void CowboyType_DbValuesRoundTrip_ReturnsOriginalValue() { foreach (var type in CowboyType.All()) { type.ShouldBeSameAs(CowboyType.FromDbValue(type.ToDbValue()), type + " did not round trip successfully"); } }
public void CowboyType_FromNullDbValue_ThrowArgNull() { try { CowboyType.FromDbValue(null); } catch (ArgumentNullException ex) { Console.WriteLine(ex.ToString()); return; } Assert.Fail("Expected exception did not occur"); }
public void CowboyType_FromInvalidDbValue_ThrowArgRange() { try { CowboyType.FromDbValue("Good"); } catch (ArgumentOutOfRangeException ex) { Console.WriteLine(ex.ToString()); return; } Assert.Fail("Expected exception did not occur"); }