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); }
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); }
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); }
public void UnconstrainedGifEncoderNull() { new UnconstrainedFrameRateGifRecorder(null, SetUp.Get <IImageProvider>()); }
public void RecorderImageProviderNull() { new Recorder(SetUp.Get <IVideoFileWriter>(), null, 10); }
public void RecorderVideoFileWriterNull() { new Recorder(null, SetUp.Get <IImageProvider>(), 10); }
public void AudioRecorderNullWriter() { new AudioRecorder(SetUp.Get <IAudioProvider>(), null); }
public void AudioRecorderNullProvider() { new AudioRecorder(null, SetUp.Get <IAudioFileWriter>()); }