public void GetPhotoURLTest()
 {
     FillDatabaseObjects();
     Assert.Equal("/images/Henk.png", EmployeeTest.GetPhotoURL());
     Assert.Equal("/Img/uknownC.png", ProductTest.GetPhotoURL());
     Assert.Equal("/Img/uknownA.img", RecipeTest.GetPhotoURL());
     Assert.Equal("/Img/uknownA.img", NewsTest.GetPhotoURL());
 }
 public void GetContentTest()
 {
     FillDatabaseObjects();
     Assert.Equal("Sleeping", EmployeeTest.GetContent());
     Assert.Equal("SaltChicken very small", ProductTest.GetContent());
     Assert.Equal("ChickenEgg", RecipeTest.GetContent());
     Assert.Equal("Mad", NewsTest.GetContent());
 }
示例#3
0
    public void SetRecipe(RecipeTest rec)
    {
        this.ingredientIds = rec.getIngredients();
        this.recipeName    = rec.getName();
        this.recipeId      = rec.getId();

        text.text = recipeName;
        foreach (int id in ingredientIds)
        {
            GameObject itemRepresentation = Instantiate(imagePrefab,
                                                        new Vector3(0, 0, 0),
                                                        Quaternion.identity,
                                                        recipeEntry.transform) as GameObject;

            Image itemSprite = itemRepresentation.GetComponent <Image>();
            itemSprite.sprite = itemSprites[id];
        }
    }