C# Class Spontaneous.WebApp.Services.MockedServicelayer

Inheritance: IServicesLayer
Afficher le fichier Open project: pashkov/Spontaneous

Méthodes publiques

Méthode 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

Méthode Description
GetMockedSearchableItems ( ) : List
SetUpEmptySearch ( Mock mocked ) : void
SetUpSearch ( Mock mocked ) : void
SetupGetDefaultItems ( Mock mocked ) : void

Method Details

AddCouponToDB() public méthode

public AddCouponToDB ( CouponType coupon ) : string
coupon Spontaneous.DataModel.CouponType
Résultat string

AddNewDish() public méthode

public AddNewDish ( Models Dish ) : int
Dish Models
Résultat int

AddNewMenuPartModel() public méthode

public AddNewMenuPartModel ( Models MenuPart ) : int
MenuPart Models
Résultat int

AddRestaurantBasicToDB() public méthode

public AddRestaurantBasicToDB ( RestaurantBasicData restaurant ) : string
restaurant Spontaneous.DataModel.RestaurantBasicData
Résultat string

AddRestaurantToDB() public méthode

public AddRestaurantToDB ( Models restaurantmodel ) : string
restaurantmodel Models
Résultat string

ApproveMeal() public méthode

public ApproveMeal ( IEnumerable meals ) : void
meals IEnumerable
Résultat void

BasicRestApproveMeal() public méthode

public BasicRestApproveMeal ( List portions ) : void
portions List
Résultat void

CalculateDistanceInKm() public méthode

public CalculateDistanceInKm ( LocationModel location1, LocationModel location2 ) : double
location1 Spontaneous.WebApp.Models.LocationModel
location2 Spontaneous.WebApp.Models.LocationModel
Résultat double

CalculateDistanceInRad() public méthode

public CalculateDistanceInRad ( LocationModel location1, LocationModel location2 ) : double
location1 Spontaneous.WebApp.Models.LocationModel
location2 Spontaneous.WebApp.Models.LocationModel
Résultat double

DeleteCoupon() public méthode

public DeleteCoupon ( string id ) : void
id string
Résultat void

GetAllCoupons() public méthode

public GetAllCoupons ( ) : List
Résultat List

GetAllIngredients() public méthode

public GetAllIngredients ( ) : List
Résultat List

GetChainRestaurantsBasicByName() public méthode

public GetChainRestaurantsBasicByName ( string name ) : List
name string
Résultat List

GetClosesMedal() public méthode

public GetClosesMedal ( ) : MedalProgress
Résultat Spontaneous.DataModel.MedalProgress

GetCoupon() public méthode

public GetCoupon ( SpontaneousUserModel userData, UserActivity userActivity ) : CouponType
userData Spontaneous.DataModel.SpontaneousUserModel
userActivity Spontaneous.DataModel.UserActivity
Résultat Spontaneous.DataModel.CouponType

GetCouponById() public méthode

public GetCouponById ( string couponId ) : CouponType
couponId string
Résultat Spontaneous.DataModel.CouponType

GetCouponModelById() public méthode

public GetCouponModelById ( string couponId ) : CouponTypeModel
couponId string
Résultat Spontaneous.WebApp.Models.CouponTypeModel

GetDefaultItems() public méthode

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

GetDishBasic() public méthode

public GetDishBasic ( int menuPartId, string restaurantId, int Id ) : Dish
menuPartId int
restaurantId string
Id int
Résultat Spontaneous.DataModel.Dish

GetGeneralDishById() public méthode

public GetGeneralDishById ( string dishId ) : GeneralDish
dishId string
Résultat Spontaneous.DataModel.GeneralDish

GetIdByMenuPartName() public méthode

public GetIdByMenuPartName ( string restaurantId, string menuPartName ) : int
restaurantId string
menuPartName string
Résultat int

GetIngredientById() public méthode

public GetIngredientById ( string id ) : Ingredient
id string
Résultat Spontaneous.DataModel.Ingredient

GetIngredientByNDBNo() public méthode

public GetIngredientByNDBNo ( int ndbNo ) : Ingredient
ndbNo int
Résultat Spontaneous.DataModel.Ingredient

GetLastMedal() public méthode

public GetLastMedal ( ) : UserMedalModel
Résultat Spontaneous.WebApp.Models.UserMedalModel

GetMedals() public méthode

public GetMedals ( ) : List
Résultat List

GetMenuPartBasic() public méthode

public GetMenuPartBasic ( int id, string RestaurantId ) : MenuPart
id int
RestaurantId string
Résultat Spontaneous.DataModel.MenuPart

GetProductByLastCharsOfBarcode() public méthode

public GetProductByLastCharsOfBarcode ( string barcode ) : Models.ProductCatalogViewModel
barcode string
Résultat Models.ProductCatalogViewModel

GetRecipeByPartialName() public méthode

public GetRecipeByPartialName ( string partialName ) : Models.RecipeModel
partialName string
Résultat Models.RecipeModel

GetRestaurantBasicById() public méthode

public GetRestaurantBasicById ( string id ) : DataModel.RestaurantBasicData
id string
Résultat DataModel.RestaurantBasicData

GetRestaurantBasicByIdFromBackup() public méthode

public GetRestaurantBasicByIdFromBackup ( string id ) : RestaurantBasicData
id string
Résultat Spontaneous.DataModel.RestaurantBasicData

GetRestaurantBasicByName() public méthode

public GetRestaurantBasicByName ( string name ) : DataModel.RestaurantBasicData
name string
Résultat DataModel.RestaurantBasicData

GetRestaurantById() public méthode

public GetRestaurantById ( string id, string lang ) : Models.RestaurantModel
id string
lang string
Résultat Models.RestaurantModel

GetRestaurantByName() public méthode

public GetRestaurantByName ( string name ) : Models.RestaurantModel
name string
Résultat Models.RestaurantModel

GetTotalPoints() public méthode

public GetTotalPoints ( ) : int
Résultat int

GetUserLastMeal() public méthode

public GetUserLastMeal ( ) : Meal
Résultat Spontaneous.DataModel.Meal

GetUserLastMealViewModel() public méthode

public GetUserLastMealViewModel ( ) : Models.MealViewModel
Résultat Models.MealViewModel

IngredientSearch() public méthode

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
Résultat List

MedalsNotificationCheck() public méthode

public MedalsNotificationCheck ( ) : bool
Résultat bool

MockedServicelayer() public méthode

public MockedServicelayer ( ) : System
Résultat System

SaveUserActivity() public méthode

public SaveUserActivity ( UserActivity userActivity ) : void
userActivity Spontaneous.DataModel.UserActivity
Résultat void

Search() public méthode

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
Résultat IList

SearchGeneralDish() public méthode

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
Résultat List

SearchNearest() public méthode

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
Résultat IList

TranslateDish() public méthode

public TranslateDish ( string restId, int menuPartId, int dishId, string fromLang, string targetlang ) : Dish
restId string
menuPartId int
dishId int
fromLang string
targetlang string
Résultat Dish

TranslateMenuPart() public méthode

public TranslateMenuPart ( MenuPart menuPart, string fromLang, string targetlang, bool withMenu ) : MenuPart
menuPart MenuPart
fromLang string
targetlang string
withMenu bool
Résultat MenuPart

TranslateMenuPart() public méthode

public TranslateMenuPart ( MenuPartModel menuPartModel, string fromLang, string targetlang, bool withMenu ) : MenuPart
menuPartModel MenuPartModel
fromLang string
targetlang string
withMenu bool
Résultat MenuPart

TranslateRestaurant() public méthode

public TranslateRestaurant ( string restId, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
restId string
fromLang string
targetlang string
withMenu bool
Résultat RestaurantBasicData

TurnOffMedalFlag() public méthode

public TurnOffMedalFlag ( ) : bool
Résultat bool

UpdateCarbsInLastMeal() public méthode

public UpdateCarbsInLastMeal ( string restaurnatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
restaurnatId string
menuPartId int
dishId int
totalCarbohydrate double
Résultat bool

UpdateCompareResult() public méthode

public UpdateCompareResult ( RestaurantsCompareList compareList ) : void
compareList RestaurantsCompareList
Résultat void

UpdateCoupon() public méthode

public UpdateCoupon ( CouponType coupon ) : void
coupon CouponType
Résultat void

UpdateCoupon() public méthode

public UpdateCoupon ( CouponTypeModel couponModel ) : void
couponModel CouponTypeModel
Résultat void

UpdateDish() public méthode

public UpdateDish ( Dish Dish, string restaurantId, int menuPartId ) : void
Dish Dish
restaurantId string
menuPartId int
Résultat void

UpdateDish() public méthode

public UpdateDish ( Models Dish ) : void
Dish Models
Résultat void

UpdateDishAndCarbs() public méthode

public UpdateDishAndCarbs ( Models Dish ) : void
Dish Models
Résultat void

UpdateDishCarbs() public méthode

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

UpdatePostMealSugar() public méthode

public UpdatePostMealSugar ( int sugarLevel ) : void
sugarLevel int
Résultat void

UpdatePreMealSugar() public méthode

public UpdatePreMealSugar ( int sugarLevel, int targetSugar ) : void
sugarLevel int
targetSugar int
Résultat void

UpdateRestaurant() public méthode

public UpdateRestaurant ( Models restaurantmodel ) : void
restaurantmodel Models
Résultat void

UploadImageToDish() public méthode

public UploadImageToDish ( string restId, int menuPartId, int dishId, HttpPostedFileBase file ) : void
restId string
menuPartId int
dishId int
file HttpPostedFileBase
Résultat void

UserLastMealCompleteRequirement() public méthode

public UserLastMealCompleteRequirement ( ) : bool
Résultat bool

UserUpdateRestaurant() public méthode

public UserUpdateRestaurant ( Models restaurantmodel ) : void
restaurantmodel Models
Résultat void

VerifyUserLastMeal() public méthode

public VerifyUserLastMeal ( ) : double
Résultat double