Exemple #1
0
		/// <summary>
		/// Assert an exported mock.
		/// </summary>
		/// <typeparam name="TObject">The type of the exported mock.</typeparam>
		/// <param name="this">The mocking container.</param>
		public static void Assert<TObject>(this MockExportProvider @this)
		{
			@this.GetExportedValue<TObject>().Assert();
		}
Exemple #2
0
		/// <summary>
		/// Assert a method on an exported mock.
		/// </summary>
		/// <typeparam name="TObject">The type of the exported mock.</typeparam>
		/// <param name="this">The mocking container.</param>
		/// <param name="expression">The method to assert.</param>
		public static void Assert<TObject>(this MockExportProvider @this, Expression<Func<TObject, object>> expression)
		{
			@this.GetExportedValue<TObject>().Assert(expression);
		}
Exemple #3
0
		/// <summary>
		/// Assert a method on an exported mock.
		/// </summary>
		/// <typeparam name="TObject">The type of the exported mock.</typeparam>
		/// <param name="this">The mocking container.</param>
		/// <param name="contractName">The contract name identifying the exported mock.</param>
		/// <param name="expression">The method to assert.</param>
		public static void Assert<TObject>(this MockExportProvider @this, string contractName, Expression<Func<TObject, object>> expression)
		{
			@this.GetExportedValue<TObject>(contractName).Assert(expression);
		}
Exemple #4
0
		/// <summary>
		/// Assert a method on an exported mock.
		/// </summary>
		/// <typeparam name="TObject">The type of the exported mock.</typeparam>
		/// <param name="this">The mocking container.</param>
		/// <param name="contractName">The contract name identifying the exported mock.</param>
		/// <param name="expression">The method to assert.</param>
		/// <param name="occurs">Occurrence expectation.</param>
		public static void Assert<TObject>(this MockExportProvider @this, string contractName, Expression<Action<TObject>> expression, Occurs occurs)
		{
			@this.GetExportedValue<TObject>(contractName).Assert(expression, occurs);
		}
Exemple #5
0
		/// <summary>
		/// Assert an exported mock.
		/// </summary>
		/// <typeparam name="TObject">The type of the exported mock.</typeparam>
		/// <param name="this">The mocking container.</param>
		/// <param name="contractName">The contract name identifying the exported mock.</param>
		public static void Assert<TObject>(this MockExportProvider @this, string contractName)
		{
			@this.GetExportedValue<TObject>(contractName).Assert();
		}