NUnit.Framework.Assert.Contains(object, System.Collections.ICollection, string)

Here are the examples of the csharp api class NUnit.Framework.Assert.Contains(object, System.Collections.ICollection, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

61 Examples 7

1. Example

View license
[Test]
        public void ParametersTest_Color4Bit_1600Dpi()
        {
            _pngDevice.Job.Profile.PngSettings.Color = PngColor.Color4Bit;
            _pngDevice.Job.Profile.PngSettings.Dpi = 1600;

            _parameterStrings = new Collection<string>(_pngDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=png16", _parameterStrings, "Missing parameter.");
        }

2. Example

View license
[Test]
        public void ParametersTest_Color32BitTransp_800Dpi()
        {
            _pngDevice.Job.Profile.PngSettings.Color = PngColor.Color32BitTransp;
            _pngDevice.Job.Profile.PngSettings.Dpi = 800;

            _parameterStrings = new Collection<string>(_pngDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=pngalpha", _parameterStrings, "Missing parameter.");
        }

3. Example

View license
[Test]
        public void ParametersTest_Grey8Bit()
        {
            _tiffDevice.Job.Profile.TiffSettings.Color = TiffColor.Gray8Bit;

            _parameterStrings = new Collection<string>(_tiffDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=tiffgray", _parameterStrings, "Missing parameter.");
        }

4. Example

View license
[Test]
        public void ParametersTest_ColorGray_Quality101_2401Dpi()
        {
            _jpegDevice.Job.Profile.JpegSettings.Color = JpegColor.Gray8Bit;
            _jpegDevice.Job.Profile.JpegSettings.Quality = 101;
            _jpegDevice.Job.Profile.JpegSettings.Dpi = 2401;

            _parameterStrings = new Collection<string>(_jpegDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=jpeggray", _parameterStrings, "Missing parameter.");
        }

5. Example

View license
[Test]
        public void ParametersTest_BlackWhite_G4Fax()
        {
            _tiffDevice.Job.Profile.TiffSettings.Color = TiffColor.BlackWhiteG4Fax;

            _parameterStrings = new Collection<string>(_tiffDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=tiffg4", _parameterStrings, "Missing parameter.");
        }

6. Example

View license
[Test]
        public void ParametersTest_ColorGray8Bit_2401Dpi()
        {
            _pngDevice.Job.Profile.PngSettings.Color = PngColor.Gray8Bit;
            _pngDevice.Job.Profile.PngSettings.Dpi = 2401;

            _parameterStrings = new Collection<string>(_pngDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=pnggray", _parameterStrings, "Missing parameter.");
        }

7. Example

View license
[Test]
        public void ParametersTest_ColorSchemes_Rgb()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.PdfSettings.ColorModel = ColorModel.Rgb;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.Contains("-sColorConversionStrategy=RGB", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dProcessColorModel=/DeviceRGB", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dConvertCMYKImagesToRGB=true", _parameterStrings, "Missing parameter.");
        }

8. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionDisabled()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.PdfSettings.CompressColorAndGray.Enabled = false;

            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-dAutoFilterColorImages=false", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dAutoFilterGrayImages=false", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dEncodeColorImages=false", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dEncodeGrayImages=false", _parameterStrings, "Missing parameter.");
        }

9. Example

View license
[Test]
        public void ParametersTest_Color24Bit_Quality5_5Dpi()
        {
            _jpegDevice.Job.Profile.JpegSettings.Color = JpegColor.Color24Bit;
            _jpegDevice.Job.Profile.JpegSettings.Quality = 5;
            _jpegDevice.Job.Profile.JpegSettings.Dpi = 5;

            _parameterStrings = new Collection<string>(_jpegDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=jpeg", _parameterStrings, "Missing parameter.");
        }

10. Example

View license
[Test]
        public void PrintingDevice_ParametersTest_DuplexShortEdge_PrinterCanDuplex()
        {
            _printingDevice.Job.Profile.Printing.Enabled = true;
            _printingDevice.Job.Profile.Printing.SelectPrinter = SelectPrinter.DefaultPrinter;
            _printingDevice.Job.Profile.Printing.Duplex = DuplexPrint.ShortEdge;

            _printerStub.Stub(x => x.IsValid).Return(true);
            _printerStub.PrinterName = PrinterName;
            _printerStub.Stub(x => x.CanDuplex).Return(true);

            _parameterStrings = new Collection<string>(_printingDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("<< /Duplex true /Tumble true >> setpagedevice ", _parameterStrings, "Missing parameter.");
        }

11. Example

View license
[Test]
        public void ParametersTest_MonoImagesZipResampling3Dpi_RaisedTo4()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Enabled = true;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Compression = CompressionMonochrome.Zip;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Resampling = true;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Dpi = 3;

            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-dEncodeMonoImages=true", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dMonoImageFilter=/FlateEncode", _parameterStrings, "Missing parameter.");

            Assert.Contains("-dMonoImageDownsampleType=/Bicubic", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dMonoImageResolution=" + 4, _parameterStrings, "Missing parameter.");
        }

12. Example

View license
[Test]
        public void ParametersTest_MonoImagesRunLengthEncoding_Resampling300Dpi()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.PdfX;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Enabled = true;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Compression = CompressionMonochrome.RunLengthEncoding;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Resampling = true;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Dpi = 300;

            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-dEncodeMonoImages=true", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dMonoImageFilter=/RunLengthEncode", _parameterStrings, "Missing parameter.");

            Assert.Contains("-dMonoImageDownsampleType=/Bicubic", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dMonoImageResolution=" + 300, _parameterStrings, "Missing parameter.");
        }

13. Example

View license
[Test]
        public void ParametersTest_PdfX_RgbBecomesCmyk()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.PdfX;
            _pdfDevice.Job.Profile.PdfSettings.ColorModel = ColorModel.Rgb;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sColorConversionStrategy=CMYK", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dProcessColorModel=/DeviceCMYK", _parameterStrings, "Missing parameter.");
        }

14. Example

View license
[Test]
        public void ParametersTest_ColorSchemes_Cmyk()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.PdfSettings.ColorModel = ColorModel.Cmyk;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.Contains("-sColorConversionStrategy=CMYK", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dProcessColorModel=/DeviceCMYK", _parameterStrings, "Missing parameter.");
        }

15. Example

View license
[Test]
        public void ParametersTest_Color24Bit_Quality4_4Dpi()
        {
            _jpegDevice.Job.Profile.JpegSettings.Color = JpegColor.Color24Bit;
            _jpegDevice.Job.Profile.JpegSettings.Quality = 4;
            _jpegDevice.Job.Profile.JpegSettings.Dpi = 4;

            _parameterStrings = new Collection<string>(_jpegDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=jpeg", _parameterStrings, "Missing parameter.");
        }

16. Example

View license
[Test]
        public void ParametersTest_BlackWhite_G3Fax()
        {
            _tiffDevice.Job.Profile.TiffSettings.Color = TiffColor.BlackWhiteG3Fax;

            _parameterStrings = new Collection<string>(_tiffDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=tiffg3", _parameterStrings, "Missing parameter.");
        }

17. Example

View license
[Test]
        public void ParametersTest_ColorGray_Quality100_2400Dpi()
        {
            _jpegDevice.Job.Profile.JpegSettings.Color = JpegColor.Gray8Bit;
            _jpegDevice.Job.Profile.JpegSettings.Quality = 100;
            _jpegDevice.Job.Profile.JpegSettings.Dpi = 2400;

            _parameterStrings = new Collection<string>(_jpegDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=jpeggray", _parameterStrings, "Missing parameter.");
        }

18. Example

View license
[Test]
        public void ParametersTest_Color8Bit_2400Dpi()
        {
            _pngDevice.Job.Profile.PngSettings.Color = PngColor.Color8Bit;
            _pngDevice.Job.Profile.PngSettings.Dpi = 2400;

            _parameterStrings = new Collection<string>(_pngDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=png256", _parameterStrings, "Missing parameter.");
        }

19. Example

View license
[Test]
        public void CheckDeviceSpecificParameters_TextFormatValueLowerThanRangeBecomes2()
        {
            _txtDevice.Job.Profile.TextSettings.Format = -1; //min for textformat is 0
            _parameterStrings = new Collection<string>(_txtDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.Contains("-dTextFormat=2", _parameterStrings, "Wrong TextFormat.");
        }

20. Example

Project: Json.Net.Unity3D
Source File: TestFixtureBase.cs
View license
public static void Contains(IList collection, object value, string message)
        {
#if !(NETFX_CORE || DNXCORE50)
            Assert.Contains(value, collection, message);
#else
            if (!collection.Cast<object>().Any(i => i.Equals(value)))
                throw new Exception(message ?? "Value not found in collection.");
#endif
        }

21. Example

View license
[Test]
        public void ParametersTest_ColorBlackWhite_4Dpi()
        {
            _pngDevice.Job.Profile.PngSettings.Color = PngColor.BlackWhite;
            _pngDevice.Job.Profile.PngSettings.Dpi = 4;

            _parameterStrings = new Collection<string>(_pngDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=pngmonod", _parameterStrings, "Missing parameter.");
        }

22. Example

View license
public static void Contains(IList collection, object value, string message)
        {
#if !(NETFX_CORE || DNXCORE50)
            Assert.Contains(value, collection, message);
#else
            if (!collection.Cast<object>().Any(i => i.Equals(value)))
                throw new Exception(message ?? "Value not found in collection.");
#endif
        }

23. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionJpegZip_Resampling2400Dpi()
 /n ..... /n //View Source file for more details /n }

24. Example

View license
[Test]
        public void ParametersTest_PageOrientation_Automatic()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.PdfA2B;
            _pdfDevice.Job.Profile.PdfSettings.PageOrientation = PageOrientation.Automatic;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.Contains("-dAutoRotatePages=/PageByPage", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dParseDSCComments=false", _parameterStrings, "Missing parameter.");
        }

25. Example

View license
[Test]
        public void ParametersTest_Color12Bit()
        {
            _tiffDevice.Job.Profile.TiffSettings.Color = TiffColor.Color12Bit;

            _parameterStrings = new Collection<string>(_tiffDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=tiff12nc", _parameterStrings, "Missing parameter.");
        }

26. Example

View license
[Test]
        public void ParametersTest_Color24Bit_5Dpi()
        {
            _pngDevice.Job.Profile.PngSettings.Color = PngColor.Color24Bit;
            _pngDevice.Job.Profile.PngSettings.Dpi = 5;

            _parameterStrings = new Collection<string>(_pngDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=png16m", _parameterStrings, "Missing parameter.");
        }

27. Example

View license
[Test]
        public void CheckDeviceSpecificParameters_TextFormatValueHigherThanRangeBecomes2()
        {
            _txtDevice.Job.Profile.TextSettings.Format = 4; //max for textformat is 3
            _parameterStrings = new Collection<string>(_txtDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.Contains("-dTextFormat=2", _parameterStrings, "Wrong TextFormat.");
        }

28. Example

View license
[Test]
        public void ParametersTest_MonoImagesZipResampling2401Dpi_LoweredTo2400()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Enabled = true;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Compression = CompressionMonochrome.Zip;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Resampling = true;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Dpi = 2401;

            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-dEncodeMonoImages=true", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dMonoImageFilter=/FlateEncode", _parameterStrings, "Missing parameter.");

            Assert.Contains("-dMonoImageDownsampleType=/Bicubic", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dMonoImageResolution=" + 2400, _parameterStrings, "Missing parameter.");
        }

29. Example

View license
[Test]
        public void ParametersTest_BlackWhite_Lzw()
        {
            _tiffDevice.Job.Profile.TiffSettings.Color = TiffColor.BlackWhiteLzw;

            _parameterStrings = new Collection<string>(_tiffDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=tifflzw", _parameterStrings, "Missing parameter.");
        }

30. Example

View license
[Test]
        public void ParametersTest_ColorSchemes_Gray()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.PdfSettings.ColorModel = ColorModel.Gray;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.Contains("-sColorConversionStrategy=Gray", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dProcessColorModel=/DeviceGray", _parameterStrings, "Missing parameter.");
        }

31. Example

View license
[Test]
        public void ParametersTest_Color24Bit()
        {
            _tiffDevice.Job.Profile.TiffSettings.Color = TiffColor.Color24Bit;

            _parameterStrings = new Collection<string>(_tiffDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-sDEVICE=tiff24nc", _parameterStrings, "Missing parameter.");
        }

32. Example

View license
[Test]
        public void PrintingDevice_ParametersTest_DuplexLongEdge_PrinterCanDuplex()
        {
            _printingDevice.Job.Profile.Printing.Enabled = true;
            _printingDevice.Job.Profile.Printing.SelectPrinter = SelectPrinter.DefaultPrinter;
            _printingDevice.Job.Profile.Printing.Duplex = DuplexPrint.LongEdge;

            _printerStub.Stub(x => x.IsValid).Return(true);
            _printerStub.PrinterName = PrinterName;
            _printerStub.Stub(x => x.CanDuplex).Return(true);

            _parameterStrings = new Collection<string>(_printingDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("<< /Duplex true /Tumble false >> setpagedevice ", _parameterStrings, "Missing parameter.");
        }

33. Example

View license
[Test]
        public void SetInteraction_RaisesPropertyChangedForEveryProperty()
        {
            var changedPropertyList = new List<string>();
            _viewModel.PropertyChanged += (sender, args) => changedPropertyList.Add(args.PropertyName);

            _viewModel.SetInteraction(_smtpAccountInteraction);

            Assert.Contains(nameof(_viewModel.Address), changedPropertyList, "Address");
            Assert.Contains(nameof(_viewModel.Username), changedPropertyList, "Username");
            Assert.Contains(nameof(_viewModel.Server), changedPropertyList, "Server");
            Assert.Contains(nameof(_viewModel.Password), changedPropertyList, "Password");
            Assert.Contains(nameof(_viewModel.Port), changedPropertyList, "Port");
            Assert.Contains(nameof(_viewModel.Ssl), changedPropertyList, "Ssl");
        }

34. Example

View license
[Test]
        public void SetInteraction_CallsRaisePropertyChangedForAllProperties()
        {
            var changedPropertyList = new List<string>();
            _viewModel.PropertyChanged += (sender, args) => changedPropertyList.Add(args.PropertyName);

            _viewModel.SetInteraction(_ftpAccountInteraction);

            Assert.Contains(nameof(_viewModel.UserName), changedPropertyList, "UserName");
            Assert.Contains(nameof(_viewModel.Server), changedPropertyList, "Server");
            Assert.Contains(nameof(_viewModel.Password), changedPropertyList, "Password");
            Assert.Contains(nameof(_viewModel.AskForPasswordLater), changedPropertyList, "AskForPasswordlater");
        }

35. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionJpegAutomatic_Resampling300Dp/n ..... /n //View Source file for more details /n }

36. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionJpegMinimum_Resampling1200Dpi/n ..... /n //View Source file for more details /n }

37. Example

View license
[Test]
        public void SetInteraction_RaisesPropertyChangedForEveryProperty()
        {
            var changedPropertyList = new List<string>();
            _viewModel.PropertyChanged += (sender, args) => changedPropertyList.Add(args.PropertyName);

            _viewModel.SetInteraction(_timeServerAccountInteraction);

            Assert.Contains(nameof(_viewModel.Url), changedPropertyList, "Url");
            Assert.Contains(nameof(_viewModel.Username), changedPropertyList, "Username");
            Assert.Contains(nameof(_viewModel.Password), changedPropertyList, "Password");
            Assert.IsTrue(_viewModel.IsSecured, "Time Server is Secured");
        }

38. Example

View license
[Test]
        public void ParametersTest_PageOrientation_Portrait()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.PdfX;
            _pdfDevice.Job.Profile.PdfSettings.PageOrientation = PageOrientation.Portrait;

            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-dAutoRotatePages=/None", _parameterStrings, "Missing parameter.");

            Assert.Contains("-c", _parameterStrings, "Missing parameter.");
            Assert.Contains("<</Orientation 0>> setpagedevice", _parameterStrings, "Missing parameter.");
            var cIndex = _parameterStrings.IndexOf("-c");
            Assert.Less(cIndex, _parameterStrings.IndexOf("<</Orientation 0>> setpagedevice"), "Destiller parameter before -c");
        }

39. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionJpegLow_Resampling150Dpi()
  /n ..... /n //View Source file for more details /n }

40. Example

View license
[Test]
        public void ParametersTest_PageOrientation_Landscape()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.PdfSettings.PageOrientation = PageOrientation.Landscape;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.Contains("-dAutoRotatePages=/None", _parameterStrings, "Missing parameter.");

            Assert.Contains("-c", _parameterStrings, "Missing parameter.");
            Assert.Contains("<</Orientation 3>> setpagedevice", _parameterStrings, "Missing parameter.");
            var cIndex = _parameterStrings.IndexOf("-c");
            Assert.Less(cIndex, _parameterStrings.IndexOf("<</Orientation 3>> setpagedevice"), "Destiller parameter before -c");
        }

41. Example

View license
[Test]
        public void ParametersTest_MonoImagesCcittFaxEncoding_ResamplingDisabled()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.PdfA2B;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Enabled = true;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Compression = CompressionMonochrome.CcittFaxEncoding;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Resampling = false;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Dpi = 123;

            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-dEncodeMonoImages=true", _parameterStrings, "Missing parameter.");
            Assert.Contains("-dMonoImageFilter=/CCITTFaxEncode", _parameterStrings, "Missing parameter.");

            Assert.IsFalse(_parameterStrings.Contains("-dDownsampleMonoImages=true"), "Falsely set resample parameter");
            Assert.IsFalse(_parameterStrings.Contains("-dMonoImageDownsampleType=/Bicubic"), "Falsely set resample parameter");
            Assert.IsFalse(_parameterStrings.Contains("-dMonoImageResolution=" + 123), "Falsely set resample parameter");
        }

42. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionJpegMaximum_ResamplingDisable/n ..... /n //View Source file for more details /n }

43. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionJpegHigh_Resampling3Dpi_Raise/n ..... /n //View Source file for more details /n }

44. Example

View license
[Test]
        public void ParametersTest_MonoImagesCompressionDisabled_ResamplingEnabled_ResamplingGetsBlocked()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Enabled = false;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Resampling = true;
            _pdfDevice.Job.Profile.PdfSettings.CompressMonochrome.Dpi = 123;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains("-dEncodeMonoImages=false", _parameterStrings, "Missing parameter.");

            Assert.IsFalse(_parameterStrings.Contains("-dDownsampleMonoImages=true"), "Falsely set resample parameter");
            Assert.IsFalse(_parameterStrings.Contains("-dMonoImageDownsampleType=/Bicubic"), "Falsely set resample parameter");
            Assert.IsFalse(_parameterStrings.Contains("-dMonoImageResolution=" + 123), "Falsely set resample parameter");
        }

45. Example

View license
[Test]
        public void SetInteraction_RaisesPropertyChangedForEveryProperty()
        {
            var changedPropertyList = new List<string>();
            _viewModel.PropertyChanged += (sender, args) => changedPropertyList.Add(args.PropertyName);

            _viewModel.SetInteraction(_httpAccountInteraction);

            Assert.Contains(nameof(_viewModel.Url), changedPropertyList, "Url");
            Assert.Contains(nameof(_viewModel.Username), changedPropertyList, "Username");
            Assert.Contains(nameof(_viewModel.Password), changedPropertyList, "Password");
            Assert.IsTrue(_viewModel.HasBasicAuthentication, "Has Basic Authentication");
        }

46. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionJpegMedium_Resampling4Dpi()
 /n ..... /n //View Source file for more details /n }

47. Example

View license
[Test]
        public void ParametersTest_GrayAndColorImagesCompressionJpegManual_Resampling2401Dpi_/n ..... /n //View Source file for more details /n }

48. Example

View license
[Test]
        public void ParametersTest_CoverPage()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.CoverPage.Enabled = true;
            const string coverFile = "CoverFile.pdf";
            _pdfDevice.Job.Profile.CoverPage.File = coverFile;

            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains(coverFile, _parameterStrings, "Missing parameter.");
            var fIndex = _parameterStrings.IndexOf("-f");
            Assert.Less(fIndex, _parameterStrings.IndexOf(coverFile), "CoverFile not behind -f parameter.");

            _pdfDevice.Job.Profile.CoverPage.Enabled = false;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.AreEqual(-1, _parameterStrings.IndexOf(coverFile), "Falsely set CoverFile.");
        }

49. Example

View license
[Test]
        public void ParametersTest_AttachmentPage()
        {
            _pdfDevice.Job.Profile.OutputFormat = OutputFormat.Pdf;
            _pdfDevice.Job.Profile.AttachmentPage.Enabled = true;
            const string attachmentFile = "AttachmentFile.pdf";
            _pdfDevice.Job.Profile.AttachmentPage.File = attachmentFile;

            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains(attachmentFile, _parameterStrings, "Missing parameter.");
            var fIndex = _parameterStrings.IndexOf("-f");
            Assert.Less(fIndex, _parameterStrings.IndexOf(attachmentFile), "AttachmentFile not behind -f parameter.");

            _pdfDevice.Job.Profile.AttachmentPage.Enabled = false;
            _parameterStrings = new Collection<string>(_pdfDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.AreEqual(-1, _parameterStrings.IndexOf(attachmentFile), "Falsely set AttachmentFile.");
        }

50. Example

Project: PDFCreator
Source File: GeneralTests.cs
View license
[Test]
        public void ParametersTest_AttachmentPage()
        {
            _outputDevice.Job.Profile.AttachmentPage.Enabled = true;
            const string attachmentFile = "AttachmentFile.pdf";
            _outputDevice.Job.Profile.AttachmentPage.File = attachmentFile;

            _parameterStrings = new Collection<string>(_outputDevice.GetGhostScriptParameters(_ghostscriptVersion));

            Assert.Contains(attachmentFile, _parameterStrings, "Missing parameter.");
            var fIndex = _parameterStrings.IndexOf("-f");
            Assert.Less(fIndex, _parameterStrings.IndexOf(attachmentFile), "AttachmentFile not behind -f parameter.");

            _outputDevice.Job.Profile.AttachmentPage.Enabled = false;
            _parameterStrings = new Collection<string>(_outputDevice.GetGhostScriptParameters(_ghostscriptVersion));
            Assert.AreEqual(-1, _parameterStrings.IndexOf(attachmentFile), "Falsely set AttachmentFile.");
        }