C# Class Spontaneous.WebApp.Services.MockedServicelayer

Inheritance: IServicesLayer
Mostrar archivo Open project: pashkov/Spontaneous

Public Methods

Method Description
AddCouponToDB ( CouponType coupon ) : string
AddNewDish ( Models Dish ) : int
AddNewMenuPartModel ( Models MenuPart ) : int
AddRestaurantBasicToDB ( RestaurantBasicData restaurant ) : string
AddRestaurantToDB ( Models restaurantmodel ) : string
ApproveMeal ( IEnumerable meals ) : void
BasicRestApproveMeal ( List portions ) : void
CalculateDistanceInKm ( LocationModel location1, LocationModel location2 ) : double
CalculateDistanceInRad ( LocationModel location1, LocationModel location2 ) : double
DeleteCoupon ( string id ) : void
GetAllCoupons ( ) : List
GetAllIngredients ( ) : List
GetChainRestaurantsBasicByName ( string name ) : List
GetClosesMedal ( ) : MedalProgress
GetCoupon ( SpontaneousUserModel userData, UserActivity userActivity ) : CouponType
GetCouponById ( string couponId ) : CouponType
GetCouponModelById ( string couponId ) : CouponTypeModel
GetDefaultItems ( System.Web.Security.MembershipUser currentUser, Location userLocation ) : IList
GetDishBasic ( int menuPartId, string restaurantId, int Id ) : Dish
GetGeneralDishById ( string dishId ) : GeneralDish
GetIdByMenuPartName ( string restaurantId, string menuPartName ) : int
GetIngredientById ( string id ) : Ingredient
GetIngredientByNDBNo ( int ndbNo ) : Ingredient
GetLastMedal ( ) : UserMedalModel
GetMedals ( ) : List
GetMenuPartBasic ( int id, string RestaurantId ) : MenuPart
GetProductByLastCharsOfBarcode ( string barcode ) : Models.ProductCatalogViewModel
GetRecipeByPartialName ( string partialName ) : Models.RecipeModel
GetRestaurantBasicById ( string id ) : DataModel.RestaurantBasicData
GetRestaurantBasicByIdFromBackup ( string id ) : RestaurantBasicData
GetRestaurantBasicByName ( string name ) : DataModel.RestaurantBasicData
GetRestaurantById ( string id, string lang ) : Models.RestaurantModel
GetRestaurantByName ( string name ) : Models.RestaurantModel
GetTotalPoints ( ) : int
GetUserLastMeal ( ) : Meal
GetUserLastMealViewModel ( ) : Models.MealViewModel
IngredientSearch ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText ) : List
MedalsNotificationCheck ( ) : bool
MockedServicelayer ( ) : System
SaveUserActivity ( UserActivity userActivity ) : void
Search ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText, double maxDistance ) : IList
SearchGeneralDish ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText ) : List
SearchNearest ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, double maxDistance ) : IList
TranslateDish ( string restId, int menuPartId, int dishId, string fromLang, string targetlang ) : Dish
TranslateMenuPart ( MenuPart menuPart, string fromLang, string targetlang, bool withMenu ) : MenuPart
TranslateMenuPart ( MenuPartModel menuPartModel, string fromLang, string targetlang, bool withMenu ) : MenuPart
TranslateRestaurant ( string restId, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
TurnOffMedalFlag ( ) : bool
UpdateCarbsInLastMeal ( string restaurnatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
UpdateCompareResult ( RestaurantsCompareList compareList ) : void
UpdateCoupon ( CouponType coupon ) : void
UpdateCoupon ( CouponTypeModel couponModel ) : void
UpdateDish ( Dish Dish, string restaurantId, int menuPartId ) : void
UpdateDish ( Models Dish ) : void
UpdateDishAndCarbs ( Models Dish ) : void
UpdateDishCarbs ( System user, string restournatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
UpdatePostMealSugar ( int sugarLevel ) : void
UpdatePreMealSugar ( int sugarLevel, int targetSugar ) : void
UpdateRestaurant ( Models restaurantmodel ) : void
UploadImageToDish ( string restId, int menuPartId, int dishId, HttpPostedFileBase file ) : void
UserLastMealCompleteRequirement ( ) : bool
UserUpdateRestaurant ( Models restaurantmodel ) : void
VerifyUserLastMeal ( ) : double

Private Methods

Method Description
GetMockedSearchableItems ( ) : List
SetUpEmptySearch ( Mock mocked ) : void
SetUpSearch ( Mock mocked ) : void
SetupGetDefaultItems ( Mock mocked ) : void

Method Details

AddCouponToDB() public method

public AddCouponToDB ( CouponType coupon ) : string
coupon Spontaneous.DataModel.CouponType
return string

AddNewDish() public method

public AddNewDish ( Models Dish ) : int
Dish Models
return int

AddNewMenuPartModel() public method

public AddNewMenuPartModel ( Models MenuPart ) : int
MenuPart Models
return int

AddRestaurantBasicToDB() public method

public AddRestaurantBasicToDB ( RestaurantBasicData restaurant ) : string
restaurant Spontaneous.DataModel.RestaurantBasicData
return string

AddRestaurantToDB() public method

public AddRestaurantToDB ( Models restaurantmodel ) : string
restaurantmodel Models
return string

ApproveMeal() public method

public ApproveMeal ( IEnumerable meals ) : void
meals IEnumerable
return void

BasicRestApproveMeal() public method

public BasicRestApproveMeal ( List portions ) : void
portions List
return void

CalculateDistanceInKm() public method

public CalculateDistanceInKm ( LocationModel location1, LocationModel location2 ) : double
location1 Spontaneous.WebApp.Models.LocationModel
location2 Spontaneous.WebApp.Models.LocationModel
return double

CalculateDistanceInRad() public method

public CalculateDistanceInRad ( LocationModel location1, LocationModel location2 ) : double
location1 Spontaneous.WebApp.Models.LocationModel
location2 Spontaneous.WebApp.Models.LocationModel
return double

DeleteCoupon() public method

public DeleteCoupon ( string id ) : void
id string
return void

GetAllCoupons() public method

public GetAllCoupons ( ) : List
return List

GetAllIngredients() public method

public GetAllIngredients ( ) : List
return List

GetChainRestaurantsBasicByName() public method

public GetChainRestaurantsBasicByName ( string name ) : List
name string
return List

GetClosesMedal() public method

public GetClosesMedal ( ) : MedalProgress
return Spontaneous.DataModel.MedalProgress

GetCoupon() public method

public GetCoupon ( SpontaneousUserModel userData, UserActivity userActivity ) : CouponType
userData Spontaneous.DataModel.SpontaneousUserModel
userActivity Spontaneous.DataModel.UserActivity
return Spontaneous.DataModel.CouponType

GetCouponById() public method

public GetCouponById ( string couponId ) : CouponType
couponId string
return Spontaneous.DataModel.CouponType

GetCouponModelById() public method

public GetCouponModelById ( string couponId ) : CouponTypeModel
couponId string
return Spontaneous.WebApp.Models.CouponTypeModel

GetDefaultItems() public method

public GetDefaultItems ( System.Web.Security.MembershipUser currentUser, Location userLocation ) : IList
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
return IList

GetDishBasic() public method

public GetDishBasic ( int menuPartId, string restaurantId, int Id ) : Dish
menuPartId int
restaurantId string
Id int
return Spontaneous.DataModel.Dish

GetGeneralDishById() public method

public GetGeneralDishById ( string dishId ) : GeneralDish
dishId string
return Spontaneous.DataModel.GeneralDish

GetIdByMenuPartName() public method

public GetIdByMenuPartName ( string restaurantId, string menuPartName ) : int
restaurantId string
menuPartName string
return int

GetIngredientById() public method

public GetIngredientById ( string id ) : Ingredient
id string
return Spontaneous.DataModel.Ingredient

GetIngredientByNDBNo() public method

public GetIngredientByNDBNo ( int ndbNo ) : Ingredient
ndbNo int
return Spontaneous.DataModel.Ingredient

GetLastMedal() public method

public GetLastMedal ( ) : UserMedalModel
return Spontaneous.WebApp.Models.UserMedalModel

GetMedals() public method

public GetMedals ( ) : List
return List

GetMenuPartBasic() public method

public GetMenuPartBasic ( int id, string RestaurantId ) : MenuPart
id int
RestaurantId string
return Spontaneous.DataModel.MenuPart

GetProductByLastCharsOfBarcode() public method

public GetProductByLastCharsOfBarcode ( string barcode ) : Models.ProductCatalogViewModel
barcode string
return Models.ProductCatalogViewModel

GetRecipeByPartialName() public method

public GetRecipeByPartialName ( string partialName ) : Models.RecipeModel
partialName string
return Models.RecipeModel

GetRestaurantBasicById() public method

public GetRestaurantBasicById ( string id ) : DataModel.RestaurantBasicData
id string
return DataModel.RestaurantBasicData

GetRestaurantBasicByIdFromBackup() public method

public GetRestaurantBasicByIdFromBackup ( string id ) : RestaurantBasicData
id string
return Spontaneous.DataModel.RestaurantBasicData

GetRestaurantBasicByName() public method

public GetRestaurantBasicByName ( string name ) : DataModel.RestaurantBasicData
name string
return DataModel.RestaurantBasicData

GetRestaurantById() public method

public GetRestaurantById ( string id, string lang ) : Models.RestaurantModel
id string
lang string
return Models.RestaurantModel

GetRestaurantByName() public method

public GetRestaurantByName ( string name ) : Models.RestaurantModel
name string
return Models.RestaurantModel

GetTotalPoints() public method

public GetTotalPoints ( ) : int
return int

GetUserLastMeal() public method

public GetUserLastMeal ( ) : Meal
return Spontaneous.DataModel.Meal

GetUserLastMealViewModel() public method

public GetUserLastMealViewModel ( ) : Models.MealViewModel
return Models.MealViewModel

IngredientSearch() public method

public IngredientSearch ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText ) : List
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
searchCount int
searchText string
return List

MedalsNotificationCheck() public method

public MedalsNotificationCheck ( ) : bool
return bool

MockedServicelayer() public method

public MockedServicelayer ( ) : System
return System

SaveUserActivity() public method

public SaveUserActivity ( UserActivity userActivity ) : void
userActivity Spontaneous.DataModel.UserActivity
return void

Search() public method

public Search ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText, double maxDistance ) : IList
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
searchCount int
searchText string
maxDistance double
return IList

SearchGeneralDish() public method

public SearchGeneralDish ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText ) : List
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
searchCount int
searchText string
return List

SearchNearest() public method

public SearchNearest ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, double maxDistance ) : IList
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
searchCount int
maxDistance double
return IList

TranslateDish() public method

public TranslateDish ( string restId, int menuPartId, int dishId, string fromLang, string targetlang ) : Dish
restId string
menuPartId int
dishId int
fromLang string
targetlang string
return Dish

TranslateMenuPart() public method

public TranslateMenuPart ( MenuPart menuPart, string fromLang, string targetlang, bool withMenu ) : MenuPart
menuPart MenuPart
fromLang string
targetlang string
withMenu bool
return MenuPart

TranslateMenuPart() public method

public TranslateMenuPart ( MenuPartModel menuPartModel, string fromLang, string targetlang, bool withMenu ) : MenuPart
menuPartModel MenuPartModel
fromLang string
targetlang string
withMenu bool
return MenuPart

TranslateRestaurant() public method

public TranslateRestaurant ( string restId, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
restId string
fromLang string
targetlang string
withMenu bool
return RestaurantBasicData

TurnOffMedalFlag() public method

public TurnOffMedalFlag ( ) : bool
return bool

UpdateCarbsInLastMeal() public method

public UpdateCarbsInLastMeal ( string restaurnatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
restaurnatId string
menuPartId int
dishId int
totalCarbohydrate double
return bool

UpdateCompareResult() public method

public UpdateCompareResult ( RestaurantsCompareList compareList ) : void
compareList RestaurantsCompareList
return void

UpdateCoupon() public method

public UpdateCoupon ( CouponType coupon ) : void
coupon CouponType
return void

UpdateCoupon() public method

public UpdateCoupon ( CouponTypeModel couponModel ) : void
couponModel CouponTypeModel
return void

UpdateDish() public method

public UpdateDish ( Dish Dish, string restaurantId, int menuPartId ) : void
Dish Dish
restaurantId string
menuPartId int
return void

UpdateDish() public method

public UpdateDish ( Models Dish ) : void
Dish Models
return void

UpdateDishAndCarbs() public method

public UpdateDishAndCarbs ( Models Dish ) : void
Dish Models
return void

UpdateDishCarbs() public method

public UpdateDishCarbs ( System user, string restournatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
user System
restournatId string
menuPartId int
dishId int
totalCarbohydrate double
return bool

UpdatePostMealSugar() public method

public UpdatePostMealSugar ( int sugarLevel ) : void
sugarLevel int
return void

UpdatePreMealSugar() public method

public UpdatePreMealSugar ( int sugarLevel, int targetSugar ) : void
sugarLevel int
targetSugar int
return void

UpdateRestaurant() public method

public UpdateRestaurant ( Models restaurantmodel ) : void
restaurantmodel Models
return void

UploadImageToDish() public method

public UploadImageToDish ( string restId, int menuPartId, int dishId, HttpPostedFileBase file ) : void
restId string
menuPartId int
dishId int
file HttpPostedFileBase
return void

UserLastMealCompleteRequirement() public method

public UserLastMealCompleteRequirement ( ) : bool
return bool

UserUpdateRestaurant() public method

public UserUpdateRestaurant ( Models restaurantmodel ) : void
restaurantmodel Models
return void

VerifyUserLastMeal() public method

public VerifyUserLastMeal ( ) : double
return double