예제 #1
0
 public void ResizeSmaller()
 {
     PhotoSizeManager sut = new PhotoSizeManager(100, 100);
      Size size = new Size(50, 50);
      Assert.That(sut.Resize(size), Is.EqualTo(size));
 }
예제 #2
0
 public void ResizeRectangle()
 {
     PhotoSizeManager sut = new PhotoSizeManager(800, 600);
      Size size = new Size(1000, 600);
      Assert.That(sut.Resize(size), Is.EqualTo(new Size(800, 480)));
 }
예제 #3
0
 public void ResizeNotProportionalExceedingWidth()
 {
     PhotoSizeManager sut = new PhotoSizeManager(100, 100);
      Size size = new Size(200, 150);
      Assert.That(sut.Resize(size), Is.EqualTo(new Size(100, 75)));
 }
예제 #4
0
 public void ResizeProportional()
 {
     PhotoSizeManager sut = new PhotoSizeManager(100, 100);
      Size size = new Size(200, 200);
      Assert.That(sut.Resize(size), Is.EqualTo(new Size(100, 100)));
 }
예제 #5
0
 public void ResizeNotProportionalExceedingHeight()
 {
     PhotoSizeManager sut = new PhotoSizeManager(100, 100);
      Size size = new Size(150, 200);
      Assert.That(sut.Resize(size), Is.EqualTo(new Size(75, 100)));
 }