public void InvokeOperation_EntityParameter_Invalid() { TestProvider_Scenarios provider = new TestProvider_Scenarios(TestURIs.TestProvider_Scenarios); A inputA = new A() { BID1 = 1 }; ValidationException expectedException = null; try { var invoke = provider.IncrementBid1ForABy(inputA, 4); } catch (ValidationException e) { expectedException = e; } Assert.IsNotNull(expectedException); Assert.AreEqual(typeof(RangeAttribute), expectedException.ValidationAttribute.GetType()); Assert.AreEqual(4, expectedException.Value); Assert.AreEqual("The field delta must be between 5 and 10.", expectedException.Message); EnqueueTestComplete(); }