HttpResponseMessage Get(AComplexType prm1, AnotherComplexType prm2) { return new HttpResponseMessage { Content = new StringContent(prm1.Value + prm2.Value) }; }
HttpResponseMessage Get(AComplexType prm1, AnotherComplexType prm2) { return(new HttpResponseMessage { Content = new StringContent(prm1.Value + prm2.Value) }); }
public void Should_build_object_setting_collection_all_elements_at_once() { var anObject = new AnotherComplexType("Robson"); var otherObject = new AnotherComplexType("Nosbor"); var createdObject = FluentBuilder <SampleClass> .New() .WithCollection(newObject => newObject.CollectionWithFieldFollowingNameConvention, anObject, otherObject) .Build(); var expected = new List <AnotherComplexType> { anObject, otherObject }; CollectionAssert.AreEqual(expected, createdObject.CollectionWithFieldFollowingNameConvention); }
public void Should_build_object_setting_different_collections_element_by_element() { var anObject = new AnotherComplexType("Robson"); var integerElement = 1000; var createdObject = FluentBuilder <SampleClass> .New() .AddingTo(newObject => newObject.CollectionWithFieldFollowingNameConvention, anObject) .AddingTo(newObject => newObject.AnotherCollection, integerElement) .AddingTo(newObject => newObject.AnotherCollection, integerElement) .Build(); var expected = new List <AnotherComplexType> { anObject }; var expectedIntCollection = new List <int> { integerElement, integerElement }; CollectionAssert.AreEqual(expected, createdObject.CollectionWithFieldFollowingNameConvention); CollectionAssert.AreEqual(expectedIntCollection, createdObject.AnotherCollection); }
public SendResponse Post([FromBody] AnotherComplexType body) { return(null); }