public void GDID() { object obj = new GDID(3, 4, 5); Assert.AreEqual(obj, obj.AsGDID()); Assert.AreEqual(obj, obj.AsGDID(new GDID(2, 3, 4))); Assert.AreEqual(obj, "3:4:5".AsGDID(new GDID(2, 3, 4))); Assert.AreEqual(new GDID(2, 3, 4), "3rewtfef:4:5".AsGDID(new GDID(2, 3, 4))); try { "3rewtfef:4:5".AsGDID(new GDID(2, 3, 4), handling: ConvertErrorHandling.Throw); Assert.Fail("No execpetion"); } catch { Assert.Pass(); } }
public void GDID() { object obj = new GDID(3, 4, 5); Aver.AreObjectsEqual(obj, obj.AsGDID()); Aver.AreObjectsEqual(obj, obj.AsGDID(new GDID(2, 3, 4))); Aver.AreObjectsEqual(obj, "3:4:5".AsGDID(new GDID(2, 3, 4))); Aver.AreEqual(new GDID(2, 3, 4), "3rewtfef:4:5".AsGDID(new GDID(2, 3, 4))); try { "3rewtfef:4:5".AsGDID(new GDID(2, 3, 4), handling: ConvertErrorHandling.Throw); Aver.Fail(Constants.ERR_NOT_THROWN); } catch { Aver.Pass(""); } }
public void GDID() { object obj = new GDID(3,4,5); Assert.AreEqual(obj, obj.AsGDID()); Assert.AreEqual(obj, obj.AsGDID(new GDID(2,3,4))); Assert.AreEqual(obj, "3:4:5".AsGDID(new GDID(2,3,4))); Assert.AreEqual(new GDID(2,3,4), "3rewtfef:4:5".AsGDID(new GDID(2,3,4))); try { "3rewtfef:4:5".AsGDID(new GDID(2,3,4), handling: ConvertErrorHandling.Throw); Assert.Fail("No execpetion"); } catch { Assert.Pass(); } }