Exemplo n.º 1
0
        public void Test_AddImage_AddsTheSpecifiedImage_WhenTheSpecifiedFileExists()
        {
            Assert.AreEqual(0, documentation.Images.Count);
            documentation.AddImage(new FileInfo("..\\..\\Documentation\\image.png"));
            Assert.AreEqual(1, documentation.Images.Count);

            Image png = documentation.Images.Where(i => i.Name.Equals("image.png")).First();

            Assert.AreEqual("image/png", png.Type);
            Assert.AreEqual("iVBORw0KGgoAAAANSUhEUgAAACAAAAAaCAYAAADWm14/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAD1UlEQVRIS7VXSU9TURS+r9oytIW2lEJR1CARDSICxpUuNNForFgVEI1xYhTBISbqwnnCORoXzpo4AbpwgyKlQAtExRiHv2BMTBwCKis2n+fc1xIMdAQXX97t67nn++459557nhgcHERD4xMsLyyBSJ6NuLQcaFJm/xfEkm+RmoNlK4vx6HETmFs0ND6FEAJCmS4NFNvok8cD7FtnJxHaTMkpuVc4S+lHBtKz5lMEskedOJ4QtmxMmUlcYioczvX0TMlBDKsKi5zTMxaofpgrljnpnQgr7Pa50KTlQ5OaS5jje0YC3xz2wb7IJ3PKPTGC7B9QVGiCYrBCoZwpcfFQ4hOiQCKU2DjVh9HmE6FGPLgAJicH2vzNMKy9DuP6+4QHPjwcNg4H92FYcw3avI1Q9JahSAQWwOTGFGjnboC50gVLbQ8sNV5YdnTBTLASUmu7YK9jdAdEKv1vIzs5l3yYKluhzS2FkmCXHIEFpBXIkOmdV4m0W4owV7lhqmpDcrUbugoXxOaXEJtaQoBsylxyjkkupBv6VVekb94TQQTkQdEpMJbclerNRGyqbkfy9nbpcPpOD5afegfnuQ9YfZ7xcQT4P8eZ98jb1wOxzYUkEsERNBTfhjKRBNjzgqWABMRoYVx3jyapAmw+8gUHX+Nw83ec6fgdEvXtv3HS1Yeii58gtrxECqXDQItStCwgWApGCHCrq6eV7H3yBec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