/// <summary> /// Asserts proper exception for non-supported operation. /// </summary> internal static void AssertNotSupportedFeatureOperation(Action action, ClientBitmaskFeature feature, ClientOp op) { var ex = Assert.Catch <Exception>(() => action()).GetBaseException(); var expectedMessage = string.Format( "Operation {0} is not supported by the server. " + "Feature {1} is missing.", op, feature); Assert.AreEqual(expectedMessage, ex.Message); }
/// <summary> /// Returns a value indicating whether specified feature is supported. /// </summary> public bool HasFeature(ClientBitmaskFeature feature) { var index = (int)feature; return(_features != null && index >= 0 && index < _features.Count && _features.Get(index)); }