Class PdfcAssert
A set of assertion methods to check two PDF files for equality.
Inheritance
Inherited Members
Namespace: PDFCNUnit.Inet.Pdfc
Assembly: PDFCNUnit.dll
Syntax
public static class PdfcAssert
Methods
AssertPdfEquals(FileStream, FileStream)
Asserts that two pdf documents given by their path contain no differences.
Declaration
public static void AssertPdfEquals(FileStream expected, FileStream actual)
Parameters
Type | Name | Description |
---|---|---|
System.IO.FileStream | expected | the InputStream of the pdf file with the expected content |
System.IO.FileStream | actual | the InputStream of the pdf file with the actual content |
AssertPdfEquals(String, FileStream, FileStream)
Asserts that two pdf documents given by their path contain no differences an NUnit.Framework.AssertionException is thrown with the given message
Declaration
public static void AssertPdfEquals(string message, FileStream expected, FileStream actual)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | the message in case of a fail |
System.IO.FileStream | expected | the InputStream of the pdf file with the expected content |
System.IO.FileStream | actual | the InputStream of the pdf file with the actual content |
AssertPdfEquals(String, String)
Asserts that two pdf documents given by their path contain no differences
Declaration
public static void AssertPdfEquals(string expected, string actual)
Parameters
Type | Name | Description |
---|---|---|
System.String | expected | the path of the pdf file with the expected content |
System.String | actual | the path of the pdf file with the actual content |
AssertPdfEquals(String, String, String)
Asserts that two pdf documents contain no differences an NUnit.Framework.AssertionException is thrown with the given message
Declaration
public static void AssertPdfEquals(string message, string expected, string actual)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | the message in case of a fail |
System.String | expected | the pdf file with the expected content |
System.String | actual | the pdf file with the actual content |
AssertPdfEquals(String, Uri, Uri)
Asserts that two pdf documents given by their path contain no differences an NUnit.Framework.AssertionException is thrown with the given message
Declaration
public static void AssertPdfEquals(string message, Uri expected, Uri actual)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | the message in case of a fail |
System.Uri | expected | the URL of the pdf file with the expected content |
System.Uri | actual | the URL of the pdf file with the actual content |
AssertPdfEquals(Uri, Uri)
Asserts that two pdf documents given by their path contain no differences.
Declaration
public static void AssertPdfEquals(Uri expected, Uri actual)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | expected | the Uri of the pdf file with the expected content |
System.Uri | actual | the Uri of the pdf file with the actual content |
AssertPdfNotEquals(String, String)
Asserts that two pdf documents contain differences.
Declaration
public static void AssertPdfNotEquals(string expected, string actual)
Parameters
Type | Name | Description |
---|---|---|
System.String | expected | the pdf file with the expected content |
System.String | actual | the pdf file with the actual content |
AssertPdfNotEquals(String, String, String)
Asserts that two pdf documents contain differences if not an NUnit.Framework.AssertionException is thrown with the given message
Declaration
public static void AssertPdfNotEquals(string message, string expected, string actual)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | the message in case of a fail |
System.String | expected | the pdf file with the expected content |
System.String | actual | the pdf file with the actual content |
SetCredentials(String, String)
Set the login credentials
Declaration
public static void SetCredentials(string user, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | user | the user name |
System.String | password | the password |
SetLogLevel(SourceLevels)
Set the log level.
Declaration
public static void SetLogLevel(SourceLevels level)
Parameters
Type | Name | Description |
---|---|---|
System.Diagnostics.SourceLevels | level | new level, once of the constant in {@link Logger} |
SetPdfcConfiguration(Dictionary<String, String>)
Defines the configuration for all subsequent calls of the assert API
Declaration
public static void SetPdfcConfiguration(Dictionary<string, string> settings)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | settings | the configuration properties to be used |
SetPdfcConfiguration(String)
Defines the configuration for all subsequent calls of the assert API
Declaration
public static void SetPdfcConfiguration(string configName)
Parameters
Type | Name | Description |
---|---|---|
System.String | configName | the name/path of the configuration file. A value will reset the internal configuration to default.
|
SetPdfcConfigurationWithName(String)
Set the compare profile with the name or id.
Declaration
public static void SetPdfcConfigurationWithName(string nameOrID)
Parameters
Type | Name | Description |
---|---|---|
System.String | nameOrID | name or id, case insensitive |
SetServicePath(String)
Set the path to the PDFC server RPC application. Possible values are:
- myhost:9900
- myhost:9900/websocket
- http://myhost:9900
- http://myhost:9900/websocket
Declaration
public static void SetServicePath(string servicePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | servicePath | the path to the service |