var player = GetIdlePlayer();
player.SetSource(Constants.VideoFileSource);
- Assert.That(() => player.EnableExportingVideoFrame(), Throws.Nothing);
+ player.EnableExportingVideoFrame();
}
catch(NotSupportedException)
{
{
Assert.Pass($"The feature({Features.RawVideo} is not supported.");
}
+ else
+ {
+ Assert.Fail("Feature is supported but exception is invoked.");
+ }
+ }
+ catch (Exception)
+ {
+ Assert.Fail("It should not throw exception");
}
}
{
var player = await GetPreparedPlayer(Constants.VideoFileSource);
- Assert.That(() => player.EnableExportingVideoFrame(),
- Throws.InvalidOperationException);
+ player.EnableExportingVideoFrame();
+ }
+ catch (InvalidOperationException)
+ {
+ Assert.Pass("the proper error occured.");
}
catch (NotSupportedException)
{
{
Assert.Pass($"The feature({Features.RawVideo} is not supported.");
}
+ else
+ {
+ Assert.Fail("Feature is supported but exception is invoked.");
+ }
+ }
+ catch (Exception)
+ {
+ Assert.Fail("It should not throw exception.");
}
}
{
GetIdlePlayer().Dispose();
- Assert.That(() => TestPlayer.EnableExportingVideoFrame(),
- Throws.TypeOf<ObjectDisposedException>());
+ TestPlayer.EnableExportingVideoFrame();
+ }
+ catch (ObjectDisposedException)
+ {
+ Assert.Pass("the proper error occured");
}
catch (NotSupportedException)
{
{
Assert.Pass($"The feature({Features.RawVideo} is not supported.");
}
+ else
+ {
+ Assert.Fail("Feature is supported but exception is invoked.");
+ }
+ }
+ catch (Exception)
+ {
+ Assert.Fail("It should not throw exception.");
}
}
try
{
var player = GetIdlePlayer();
- Assert.That(() => player.DisableExportingVideoFrame(), Throws.Nothing);
+ player.DisableExportingVideoFrame();
player.SetSource(Constants.VideoFileSource);
await player.PrepareAsync();
- Assert.That(() => player.DisableExportingVideoFrame(), Throws.Nothing);
+ player.DisableExportingVideoFrame();
}
catch (NotSupportedException)
{
{
Assert.Pass($"The feature({Features.RawVideo} is not supported.");
}
+ else
+ {
+ Assert.Fail("Feature is supported but exception is invoked.");
+ }
+ }
+ catch (Exception)
+ {
+ Assert.Fail("It should not throw exception");
}
}
{
var player = await GetPlayingPlayer(Constants.VideoFileSource);
- Assert.That(() => player.DisableExportingVideoFrame(),
- Throws.InvalidOperationException);
+ player.DisableExportingVideoFrame();
+ }
+ catch (InvalidOperationException)
+ {
+ Assert.Pass("the proper error occured.");
}
catch (NotSupportedException)
{
{
Assert.Pass($"The feature({Features.RawVideo} is not supported.");
}
+ else
+ {
+ Assert.Fail("Feature is supported but exception is invoked.");
+ }
+ }
+ catch (Exception)
+ {
+ Assert.Fail("It should not throw exception.");
}
}
{
GetIdlePlayer().Dispose();
- Assert.That(() => TestPlayer.DisableExportingVideoFrame(), Throws.TypeOf<ObjectDisposedException>());
+ TestPlayer.DisableExportingVideoFrame();
+ }
+ catch (ObjectDisposedException)
+ {
+ Assert.Pass("the proper error occured.");
}
catch (NotSupportedException)
{
{
Assert.Pass($"The feature({Features.RawVideo} is not supported.");
}
+ else
+ {
+ Assert.Fail("Feature is supported but exception is invoked.");
+ }
+ }
+ catch (Exception)
+ {
+ Assert.Fail("It should not throw exception.");
}
}
#endregion