}
[Test]
- [Category("P2")]
- [Description("Check InvalidOperationException when creating pipeline instance")]
- [Property("SPEC", "Tizen.MachineLearning.Inference.Pipeline.Pipeline C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTX")]
- [Property("COVPARAM", "string")]
- [Property("AUTHOR", "Gichan Jang, gichan2.jang@samsung.com")]
- public void Pipeline_INIT_CHECK_UnauthorizedAccessException()
- {
- bool _isPrivacyPrivilegeSupported = false;
- try
- {
- /* Check the privilege support */
- Information.TryGetValue(PrivilegeFeatureKey, out _isPrivacyPrivilegeSupported);
-
- string description = "tizencamvideosrc ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=320,height=240 ! tensor_converter ! tensor_sink";
-
- /* TEST CODE */
- var pipeline_handle = new Pipeline(description);
-
- Assert.True(false, "DO NOT COME HERE!");
- }
- catch (Exception e)
- {
- if (e is NotSupportedException)
- {
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "NotSupportedException occurs");
- Assert.IsTrue(_isMachineLeanringInferenceSupported == false, "Invalid NotSupportedException");
- }
- else if (e is UnauthorizedAccessException)
- {
- Assert.Pass("UnauthorizedAccessException: passed!");
- }
- else
- {
- Assert.IsTrue(_isPrivacyPrivilegeSupported == false, e.Message);
- }
- }
- }
-
- [Test]
[Category("P1")]
[Description("Get the state of the pipeline and check exception")]
[Property("SPEC", "Tizen.MachineLearning.Inference.Pipeline.State A")]