コード例 #1
0
        public void RotationCompare_Minus1()
        {
            var metaPreflight = new MetaPreflight(_query, _appSettings,
                                                  new FakeSelectorStorage(_iStorageFake), new FakeIWebLogger());
            var compareList     = new List <string>();
            var rotationCompare = MetaPreflight.RotationCompare(-1,
                                                                new FileIndexItem("/test.jpg")
            {
                Orientation = FileIndexItem.Rotation.Horizontal
            },
                                                                compareList);

            Assert.AreEqual(rotationCompare.Orientation, FileIndexItem.Rotation.Rotate270Cw);
            Assert.AreEqual(compareList.FirstOrDefault(),
                            nameof(FileIndexItem.Orientation).ToLowerInvariant());
        }
コード例 #2
0
        public void RotationCompare_DoNotRotate()
        {
            var metaPreflight = new MetaPreflight(_query, _appSettings,
                                                  new FakeSelectorStorage(_iStorageFake), new FakeIWebLogger());
            var compareList = new List <string>();

            var rotationCompare = MetaPreflight.RotationCompare(0,
                                                                new FileIndexItem("/test.jpg")
            {
                Orientation = FileIndexItem.Rotation.Horizontal
            },
                                                                compareList);

            Assert.AreEqual(rotationCompare.Orientation, FileIndexItem.Rotation.Horizontal);
            Assert.IsTrue(!compareList.Any());
        }