GetGuid() public méthode

Returns a Guid that contains the value of the specified variable.
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 returns null.
Résultat System.Guid
Exemple #1
0
        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 { }
 }