Exemplo n.º 1
0
        public void CustomIcon_UpdateFavoriteIcon_DoesntSaveFavorite()
        {
            var favorite = this.AddFavorite();

            this.Favorites.UpdateFavoriteIcon(favorite, ImageAssert.IMAGE_FILE);
            FilePersistence secondaryPersistence = CreateFilePersistence();
            IFavorite       checkfavorite        = secondaryPersistence.Favorites.FirstOrDefault();
            Image           favoriteIcon         = secondaryPersistence.Favorites.LoadFavoriteIcon(checkfavorite);

            string testDeploymentDir = this.TestContext.TestDeploymentDir;

            ImageAssert.DoesntEqualsExpectedIcon(testDeploymentDir, favoriteIcon);
        }
Exemplo n.º 2
0
        public void UpdateFavoriteIcon_DoesntStoreIconToDatabase()
        {
            IFavorite favorite = this.CreateTestFavorite();

            this.PrimaryFavorites.Add(favorite);

            this.PrimaryFavorites.UpdateFavoriteIcon(favorite, IMAGE_FILE);

            IFavorite loaded              = this.SecondaryFavorites.First();
            Image     loadedIcon          = this.SecondaryFavorites.LoadFavoriteIcon(loaded);
            string    deploymentDirectory = this.TestContext.DeploymentDirectory;

            ImageAssert.DoesntEqualsExpectedIcon(deploymentDirectory, loadedIcon);
        }