public CompositeType GetDataUsingDataContract(CompositeType composite) { if (composite.BoolValue) { composite.StringValue += "Suffix"; } return composite; }
public void GetDataUsingDataContractIntegrationTest() { var target = CreateIService1(); var composite = new CompositeType {BoolValue = true}; var expected = new CompositeType {StringValue = "Hello Suffix"}; var actual = target.GetDataUsingDataContract(composite); Assert.AreEqual(expected.StringValue, actual.StringValue); }
public CompositeType GetDataUsingDataContract(CompositeType composite) { if (composite == null) { throw new ArgumentNullException("composite"); } if (composite.BoolValue) { composite.StringValue += "Suffix"; } return composite; }