public override bool Matches(object actual)
{
ExpectedValue = "Object should" + (_shouldExist ? "" : " not") + " exist.";
ActualValue = "Object does" + (_shouldExist ? " not" : "") + " exist.";
_session.Clear();
try
{
var path = (string)actual;
path = path.StartsWith("/") ? path : "/" + path;
return _session.GetObjectByPath(path) != null ? _shouldExist : !_shouldExist;
}
catch(CmisBaseException)
{
return !_shouldExist;
}
}
}