コード例 #1
0
        public void TestDisplayImageFitWindowSize002()
        {
            MyTrimmingNew.ImageController ic = Common.GetDisplayImage(Common.TestResourceImage002Path);

            int    ansImageHeight = Common.WindowInitHeight - MyTrimmingNew.Constant.FixCanvasHeight;
            double ratio          = (double)ansImageHeight / (double)ic.BitmapImage.Height;
            int    ansImageWidth  = (int)((double)ic.BitmapImage.Width * ratio);

            Assert.AreEqual(ansImageWidth, ic.DisplayImageWidth);
            Assert.AreEqual(ansImageHeight, ic.DisplayImageHeight);
        }
コード例 #2
0
 public void TestNotEqualOfImageNameAndSaveNameExample()
 {
     MyTrimmingNew.ImageController ic = Common.GetDisplayImage(Common.TestResourceImage001Path);
     Assert.AreNotEqual(System.IO.Path.GetFileName(Common.TestResourceImage001Path), ic.SaveNameExample);
 }
コード例 #3
0
 public void TestSuccessOfCreateBitmapAfterNewImage()
 {
     MyTrimmingNew.ImageController ic = Common.GetDisplayImage(Common.TestResourceImage001Path);
     Assert.IsNotNull(ic.BitmapImage);
 }