Xamarin Public Jenkins (auto-signing) e46a49ecf1 Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
2018-01-24 17:04:36 +00:00

45 lines
1.1 KiB
C#

#if !MOBILE && !XAMMAC_4_5
using System;
using System.Collections.Generic;
using System.Text;
using Proxy.MonoTests.Features.Client;
using NUnit.Framework;
using System.ServiceModel;
using MonoTests.Features.Contracts;
namespace MonoTests.Features.Serialization
{
[TestFixture]
public class FaultsTest : TestFixtureBase<FaultsTesterContractClient, FaultsTester, MonoTests.Features.Contracts.IFaultsTesterContract>
{
[Test]
public void TestFault ()
{
try {
Client.FaultMethod ("heh");
}
catch (FaultException e) {
return;
}
Assert.Fail ("No exception was thrown");
}
}
[TestFixture]
public class FaultsTestIncludeDetails : TestFixtureBase<FaultsTesterContractClientIncludeDetails, MonoTests.Features.Contracts.FaultsTesterIncludeDetails, MonoTests.Features.Contracts.IFaultsTesterContractIncludeDetails>
{
[Test]
public void TestFault ()
{
try {
Client.FaultMethod ("heh");
}
catch (FaultException<ExceptionDetail> e) {
Assert.AreEqual ("heh", e.Message);
return;
}
Assert.Fail ("No exception was thrown");
}
}
}
#endif