public GetGuid ( string name, System.Guid defaultValue ) : System.Guid | ||
name | string | The name of the variable to be read. |
defaultValue | System.Guid | The value to be returned if |
return | System.Guid |
public void GetGuid() { VariableAccessor va = new VariableAccessor(_testVariableSource); Assert.AreEqual(TESTGUID, va.GetGuid("ValidGuid", TESTGUID_DEFAULT)); Assert.AreEqual(TESTGUID_DEFAULT, va.GetGuid("InvalidGuid", TESTGUID_DEFAULT, false)); }
public void GetGuid() { VariableAccessor va = new VariableAccessor(_testVariableSource); Assert.AreEqual(TESTGUID, va.GetGuid("ValidGuid", TESTGUID_DEFAULT)); Assert.AreEqual(TESTGUID_DEFAULT, va.GetGuid("InvalidGuid", TESTGUID_DEFAULT, false)); try { va.GetGuid("InvalidGuid", TESTGUID_DEFAULT, true); Assert.Fail(); } catch { } }