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); }
public void TestNotEqualOfImageNameAndSaveNameExample() { MyTrimmingNew.ImageController ic = Common.GetDisplayImage(Common.TestResourceImage001Path); Assert.AreNotEqual(System.IO.Path.GetFileName(Common.TestResourceImage001Path), ic.SaveNameExample); }
public void TestSuccessOfCreateBitmapAfterNewImage() { MyTrimmingNew.ImageController ic = Common.GetDisplayImage(Common.TestResourceImage001Path); Assert.IsNotNull(ic.BitmapImage); }