public void Get_WhenRequestToItemCreatedByWhichIdIs1_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/vendor(1)/CreatedBy", "..\\..\\..\\resultRepository\\VendorControllerTests-Get_WhenRequestToItemCreatedByWhichIdIs1_ThenExpectedResult.json"); result.ShouldBeTrue(); }
public void Get_WhenRequestToItemWhichIdIs1AndTypeIsShoppingProductAndUnitType_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/product(1)/Sample.ShoppingProduct/UnitType", "..\\..\\..\\resultRepository\\ProductControllerTests-Get_WhenRequestToItemWhichIdIs1AndTypeIsShoppingProductAndUnitType_ThenExpectedResult.json"); result.ShouldBeTrue(); }
public void Get_WhenRequestToItemNameWhichIdIs1AndOnlyValue_ThenExpectedResult() { var result = TestHelperService.GetAndCompareStringResultFromWebRequestAndStoredData( "https://localhost:5001/odata/vendor(1)/Name/$value", "..\\..\\..\\resultRepository\\VendorControllerTests-Get_WhenRequestToItemNameWhichIdIs1AndOnlyValue_ThenExpectedResult.txt"); result.ShouldBeTrue(); }
public void Get_WhenRequestToAllItemsOnlyLongDescritionColumn_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/product/Sample.ServiceProduct?$select=longDescription", "..\\..\\..\\resultRepository\\ProductControllerTests-Get_WhenRequestToAllItemsOnlyLongDescritionColumn_ThenExpectedResult.json"); result.ShouldBeTrue(); }
public void Get_WhenRequestToAllItemsForOnlyNameColumn_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/vendor?$select=name", "..\\..\\..\\resultRepository\\VendorControllerTests-Get_WhenRequestToAllItemsForOnlyNameColumn_ThenExpectedResult.json" ); result.ShouldBeTrue(); }
public void Get_WhenRequestToItemProducts1WhichIdIs5AndTypeIsServiceCategory_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/vendor(1)/products(5)", "..\\..\\..\\resultRepository\\VendorControllerTests-Get_WhenRequestToItemProducts1WhichIdIs5AndTypeIsServiceCategory_ThenExpectedResult.json", (d) => { d.Remove("CreatedAt"); d.Remove("ModifiedAt"); }); result.ShouldBeTrue(); }
public void Get_WhenRequestToItemWhichIdIs1AndTypeIsShoppingProductAndCategory_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/product(1)/Sample.ShoppingProduct/Category", "..\\..\\..\\resultRepository\\ProductControllerTests-Get_WhenRequestToItemWhichIdIs1AndTypeIsShoppingProductAndCategory_ThenExpectedResult.json", (d) => { d.Remove("CreatedAt"); d.Remove("ModifiedAt"); }); result.ShouldBeTrue(); }
public void Get_WhenRequestToItemWhichIdIs7_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/category(7)", "..\\..\\..\\resultRepository\\CategoryControllerTests-Get_WhenRequestToItemWhichIdIs7_ThenExpectedResult.json", (d) => { d.Remove("CreatedAt"); d.Remove("ModifiedAt"); }); result.ShouldBeTrue(); }
public void Get_WhenRequestToAllItemsToOrderedByName_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/vendor?$orderby=name", "..\\..\\..\\resultRepository\\VendorControllerTests-Get_WhenRequestToAllItemsToOrderedByName_ThenExpectedResult.json", (d) => { var value = (d["value"] as object[]).Cast <Dictionary <object, object> >(); foreach (var v in value) { v.Remove("CreatedAt"); v.Remove("ModifiedAt"); } }); result.ShouldBeTrue(); }
public void Get_WhenRequestToItemChildrenWhichIdIs1AndTypeIsShoppingCategory_ThenExpectedResult() { var result = TestHelperService.GetAndCompareResultFromWebRequestAndStoredData( "https://localhost:5001/odata/category(1)/Sample.ShoppingCategory/Children", "..\\..\\..\\resultRepository\\CategoryControllerTests-Get_WhenRequestToItemChildrenWhichIdIs1AndTypeIsShoppingCategory_ThenExpectedResult.json", (d) => { var value = (d["value"] as object[]).Cast <Dictionary <object, object> >(); foreach (var v in value) { v.Remove("CreatedAt"); v.Remove("ModifiedAt"); } }); result.ShouldBeTrue(); }