Esempio n. 1
0
        public BakedBeansSet()
        {
            RecipeLoader loader = new RecipeLoader();

            Recipe = loader.LoadRecipe(0);
            CompatibleBuildings    = new BuildingTypes[1];
            CompatibleBuildings[0] = BuildingTypes.CanningFactory;
        }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     ingredObjList   = new List <GameObject> ();
     instructObjList = new List <GameObject> ();
     instance        = this;
     grid            = gridObject.GetComponent <GridLayoutGroup> ();
     Recipes.instance.ParseFile(Recipes.instance.recipeFilePath);
 }
Esempio n. 3
0
        public void RecipeLoaderSetPermalinkLoading_ShouldSetWithPermalink()
        {
            var recipe       = Mock.Recipes.SWEET_AND_SPICY_CHICKEN;
            var recipeLoader = new RecipeLoader(this.Context, recipe);

            var loader = recipeLoader.SetPermalinkLoading();

            Assert.AreEqual(true, recipeLoader.WithPermalink);
        }
Esempio n. 4
0
        public void RecipeLoaderSetCookbookStatusLoading_ShouldSetWithCookbookStatus()
        {
            var recipe       = Mock.Recipes.SWEET_AND_SPICY_CHICKEN;
            var recipeLoader = new RecipeLoader(this.Context, recipe);

            var loader = recipeLoader.SetCookbookStatusLoading();

            Assert.AreEqual(true, recipeLoader.WithCookbookStatus);
        }
Esempio n. 5
0
        public void RecipeLoaderLoad_ShouldAddARecipeToTheCollection()
        {
            var recipe       = Mock.Recipes.SWEET_AND_SPICY_CHICKEN;
            var recipe2      = Mock.Recipes.QUICK_SANDWHICH;
            var recipeLoader = new RecipeLoader(this.Context, recipe);

            var loader = recipeLoader.Load(recipe2);

            CollectionAssert.AreEqual(new List <Recipe>()
            {
                recipe, recipe2
            }, recipeLoader.RecipesToLoad);
        }
Esempio n. 6
0
        public void RecipeLoaderList_ShouldCallContextReadRecipe()
        {
            var recipe       = Mock.Recipes.SWEET_AND_SPICY_CHICKEN;
            var recipeLoader = new RecipeLoader(this.Context, recipe);

            recipeLoader.SetMethodLoading();
            recipeLoader.SetPermalinkLoading();
            this.Context.RRCalledTimes = 0;

            var loader = recipeLoader.List();

            Assert.AreEqual(1, this.Context.RRCalledTimes);

            Assert.AreEqual(recipeLoader.WithCommentCount, this.Context.options.ReturnCommentCount);
            Assert.AreEqual(recipeLoader.WithCookbookStatus, this.Context.options.ReturnCookbookStatus);
            Assert.AreEqual(recipeLoader.WithUserRating, this.Context.options.ReturnUserRating);
            Assert.AreEqual(recipeLoader.WithPermalink, this.Context.options.ReturnPermalink);
            Assert.AreEqual(recipeLoader.WithMethod, this.Context.options.ReturnMethod);
        }
        protected Configuration GetConfiguration()
        {
            Configuration nhConfig = null;

            if (RecipeLoader.DefaultConfiguration != null)
            {
                nhConfig = RecipeLoader.DefaultConfiguration();
            }
            nhConfig = nhConfig ?? new Configuration().DataBaseIntegration(db =>
            {
                db.Dialect <SQLiteDialect>();
                db.Driver <SQLite20Driver>();
                db.ConnectionProvider <SharedConnectionConnectionProvider>();
                db.ConnectionString = "FullUri=file:memorydb.db";
            });
            nhConfig.DataBaseIntegration(db =>
            {
                db.LogFormattedSql = true;
                db.LogSqlInConsole = false;
            });
            nhConfig.SetProperty("generate_statistics", "true");
            return(nhConfig);
        }
        public void RecipeLoaderSetUserRatingLoading_ShouldSetWithUserRating()
        {
            var recipe = Mock.Recipes.SWEET_AND_SPICY_CHICKEN;
            var recipeLoader = new RecipeLoader(this.Context, recipe);

            var loader = recipeLoader.SetUserRatingLoading();

            Assert.AreEqual(true, recipeLoader.WithUserRating);
        }
        public void RecipeLoaderLoad_ShouldAddARecipeToTheCollection()
        {
            var recipe = Mock.Recipes.SWEET_AND_SPICY_CHICKEN;
            var recipe2 = Mock.Recipes.QUICK_SANDWHICH;
            var recipeLoader = new RecipeLoader(this.Context, recipe);

            var loader = recipeLoader.Load(recipe2);

            CollectionAssert.AreEqual(new List<Recipe>() { recipe, recipe2 }, recipeLoader.RecipesToLoad);
        }
        public void RecipeLoaderList_ShouldCallContextReadRecipe()
        {
            var recipe = Mock.Recipes.SWEET_AND_SPICY_CHICKEN;
            var recipeLoader = new RecipeLoader(this.Context, recipe);
            recipeLoader.SetMethodLoading();
            recipeLoader.SetPermalinkLoading();
            this.Context.RRCalledTimes = 0;

            var loader = recipeLoader.List();

            Assert.AreEqual(1, this.Context.RRCalledTimes);

            Assert.AreEqual(recipeLoader.WithCommentCount, this.Context.options.ReturnCommentCount);
            Assert.AreEqual(recipeLoader.WithCookbookStatus, this.Context.options.ReturnCookbookStatus);
            Assert.AreEqual(recipeLoader.WithUserRating, this.Context.options.ReturnUserRating);
            Assert.AreEqual(recipeLoader.WithPermalink, this.Context.options.ReturnPermalink);
            Assert.AreEqual(recipeLoader.WithMethod, this.Context.options.ReturnMethod);
        }
Esempio n. 11
0
 public void Awake()
 {
     instance = this;
     InitializeDatabase();
     Debug.Log(itemDatabase.Count);
 }
Esempio n. 12
0
        protected sealed override void Register()
        {
            ModTypeLookup <GlobalRecipe> .Register(this);

            RecipeLoader.Add(this);
        }