public bool Equals(FindItemRequest <TEntity> other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other.Id.Equals(Id)); }
public void Should_Throw_On_Null_Or_Empty_Request_Parameter() { //Given ICakeContext context = _Context; SsrsConnectionSettings settings = _Settings; FindItemRequest request = null; //When var record = Record.Exception(() => SsrsAliases.SsrsFindItem(context, request, settings)); //Then CakeAssert.IsArgumentNullException(record, nameof(request)); }
async Task <FindItemResponse> Online.ISalesManager.FindItemAsync(FindItemRequest request) { var validationProxy = Proxy.ForComponent <IValidationEngine>(this); await validationProxy.ValidateAsync(new ValidateCriteria()); var restaurantProxy = Proxy.ForComponent <IRestaurantAccess>(this); await restaurantProxy.FilterAsync(new RestaurantCriteria()); var orderingEngine = Proxy.ForComponent <IOrderingEngine>(this); await orderingEngine.MatchAsync(new ItemCriteria()); var pricingProxy = Proxy.ForComponent <IPricingEngine>(this); await pricingProxy.CalculateAsync(); return(MapInternalToPublic()); }
public IHttpActionResult Find(FindItemRequest request) { if (request == null) { return(BadRequest(AppStatusCode.InvalidInput, "Find request object must be provided.")); } var response = _recipeStore.FindRecipes(request.FieldName, request.Value, request.Strategy, request.Limit); if (response.Code != AppStatusCode.Ok) { Log.ErrorFormat("POST /recipes/find failed for field {0} and value {1} with code {2}. {3}", request.FieldName, request.Value, (int)response.Code, response.Message); return(InternalServerError(response.Code, response.Message)); } return(Ok(response)); }
public void Should_Return_Catalog_Item(string folder, string itemName) { //Given ICakeContext context = _Context; SsrsConnectionSettings settings = _Settings; FindItemRequest request = new FindItemRequest { Folder = folder, ItemName = itemName, Recursive = true }; //When var item = SsrsAliases.SsrsFindItem(context, request, settings); //Then Assert.NotNull(item); }
public void Should_Throw_On_Null_SettingsConfigurator_Parameter() { //Given ICakeContext context = _Context; Action <SsrsConnectionSettings> settingsConfigurator = null; FindItemRequest request = new FindItemRequest { Folder = "/AdventureWorks", ItemName = null, Recursive = true }; //When var record = Record.Exception(() => SsrsAliases.SsrsFindItem(context, request, settingsConfigurator)); //Then CakeAssert.IsArgumentNullException(record, nameof(settingsConfigurator)); }
public void Should_Throw_On_Null_Or_Empty_Folder_Parameter() { //Given ICakeContext context = _Context; SsrsConnectionSettings settings = _Settings; FindItemRequest request = new FindItemRequest { Folder = null, ItemName = "Item Name", Recursive = true }; //When var record = Record.Exception(() => SsrsAliases.SsrsFindItem(context, request, settings)); //Then CakeAssert.IsArgumentNullException(record, nameof(request.Folder)); }