public async Task <Item> MethodWithSameName(string resultItemName) { var item = await ItemsGenerator.GenerateItem().ConfigureAwait(false); item.Name = resultItemName; return(item); }
private async Task <bool> IsItemCorrect(Item item) { var expectedItem = await ItemsGenerator.GenerateItem(); var isItemCorrect = expectedItem.Equals(item); return(isItemCorrect); }
public async Task TestItemResult() { var result = await _controller.ItemResult(); var expectedItem = await ItemsGenerator.GenerateItem(); Assert.Equal(expectedItem, result); }
public async Task TestNoPathWithBodyParameter() { var item = await ItemsGenerator.GenerateItem(); var result = await _service.EmptyPathWithBodyParameter(item); Assert.True(result); }
public async Task TestBodyParameterAsLastParameter(FormatterSelection formatter) { var client = Client <ISerializeParameterController>(formatter); var expectedItem = await ItemsGenerator.GenerateItem(); var actualItem = await client.GetItemBodyParameterAsLastParameter(ItemsGenerator.TestGuid, "Test", expectedItem); Assert.Equal(expectedItem, actualItem); }
public async Task TestBodyParameterWithNoAttribute(FormatterSelection formatter) { var client = Client <ISerializeParameterController>(formatter); var expectedItem = await ItemsGenerator.GenerateItem(); var actualItem = await client.GetItemBodyParameterWithNoAttribute(expectedItem); Assert.NotEqual(expectedItem, actualItem); }
public async Task TestNoPathWithAllParameterTypes() { var item = await ItemsGenerator.GenerateItem(); var result = await _service.EmptyPathWithAllParameters( item, ItemsGenerator.TestString, ItemsGenerator.TestInt, ItemsGenerator.TestGuid, ItemsGenerator.TestDate, ItemsGenerator.TestString, ItemsGenerator.TestInt, ItemsGenerator.TestGuid, ItemsGenerator.TestDate); Assert.True(result); }
public async Task TestMethodsWithSameNames() { var item = await _controller.MethodWithSameName(); var expectedItem = await ItemsGenerator.GenerateItem(); Assert.Equal(expectedItem, item); var resultItemName = "ResultItemName"; var resultItem = await _controller.MethodWithSameName(resultItemName); Assert.Equal(resultItemName, resultItem.Name); }
public async Task<Item> MethodWithSameUrl2() { var item = await ItemsGenerator.GenerateItem().ConfigureAwait(false); return item; }
public async Task <Item> ItemResult() { var item = await ItemsGenerator.GenerateItem(); return(item); }