Ejemplo n.º 1
0
        public void RotatedImageProviderFlip()
        {
            var sourceImageProvider = SetUp.Get <IImageProvider>();

            var rotatedImageProvider = new RotatedImageProvider(sourceImageProvider, RotateFlipType.Rotate180FlipNone);

            var capture = rotatedImageProvider.Capture();

            Assert.AreEqual(sourceImageProvider.Width, capture.Width);
            Assert.AreEqual(sourceImageProvider.Width, rotatedImageProvider.Width);

            Assert.AreEqual(sourceImageProvider.Height, capture.Height);
            Assert.AreEqual(sourceImageProvider.Height, rotatedImageProvider.Height);
        }
Ejemplo n.º 2
0
        public void ResizedImageProvider()
        {
            const int targetWidth  = 6,
                      targetHeight = 7;

            var resizedImageProvider = new ResizedImageProvider(SetUp.Get <IImageProvider>(), targetWidth, targetHeight, Color.Empty);

            var capture = resizedImageProvider.Capture();

            Assert.AreEqual(targetWidth, capture.Width);
            Assert.AreEqual(targetWidth, resizedImageProvider.Width);

            Assert.AreEqual(targetHeight, capture.Height);
            Assert.AreEqual(targetHeight, resizedImageProvider.Height);
        }
Ejemplo n.º 3
0
        public void RecorderStates()
        {
            var recorder = new Recorder(SetUp.Get <IVideoFileWriter>(), SetUp.Get <IImageProvider>(), 10);

            Assert.AreEqual(recorder.State, RecorderState.Ready);

            recorder.Start();

            Assert.AreEqual(recorder.State, RecorderState.Recording);

            recorder.Pause();

            Assert.AreEqual(recorder.State, RecorderState.Paused);

            recorder.Start();

            Assert.AreEqual(recorder.State, RecorderState.Recording);

            recorder.Stop();

            Assert.AreEqual(recorder.State, RecorderState.Stopped);
        }
Ejemplo n.º 4
0
 public void UnconstrainedGifEncoderNull()
 {
     new UnconstrainedFrameRateGifRecorder(null, SetUp.Get <IImageProvider>());
 }
Ejemplo n.º 5
0
 public void RecorderImageProviderNull()
 {
     new Recorder(SetUp.Get <IVideoFileWriter>(), null, 10);
 }
Ejemplo n.º 6
0
 public void RecorderVideoFileWriterNull()
 {
     new Recorder(null, SetUp.Get <IImageProvider>(), 10);
 }
Ejemplo n.º 7
0
 public void AudioRecorderNullWriter()
 {
     new AudioRecorder(SetUp.Get <IAudioProvider>(), null);
 }
Ejemplo n.º 8
0
 public void AudioRecorderNullProvider()
 {
     new AudioRecorder(null, SetUp.Get <IAudioFileWriter>());
 }