Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <auto-generated/>
// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
Expand Down Expand Up @@ -110,39 +110,43 @@ namespace TUnit.Mocks.Generated
}

[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public readonly struct IReadWriter_Write_M2_TypedSetup : global::TUnit.Mocks.Setup.IVoidMethodSetup
public readonly struct IReadWriter_Write_M2_TypedSetup
{
private readonly global::TUnit.Mocks.Setup.VoidMethodSetupBuilder _inner;

internal IReadWriter_Write_M2_TypedSetup(global::TUnit.Mocks.Setup.VoidMethodSetupBuilder inner) => _inner = inner;

/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Throws<TException>() where TException : global::System.Exception, new() => _inner.Throws<TException>();
public IReadWriter_Write_M2_TypedSetup Throws<TException>() where TException : global::System.Exception, new() { _inner.Throws<TException>(); return this; }
/// <inheritdoc />
public IReadWriter_Write_M2_TypedSetup Throws(global::System.Exception exception) { _inner.Throws(exception); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Throws(global::System.Exception exception) => _inner.Throws(exception);
public IReadWriter_Write_M2_TypedSetup Callback(global::System.Action callback) { _inner.Callback(callback); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Callback(global::System.Action callback) => _inner.Callback(callback);
public IReadWriter_Write_M2_TypedSetup Callback(global::System.Action<object?[]> callback) { _inner.Callback(callback); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Callback(global::System.Action<object?[]> callback) => _inner.Callback(callback);
public IReadWriter_Write_M2_TypedSetup Throws(global::System.Func<object?[], global::System.Exception> exceptionFactory) { _inner.Throws(exceptionFactory); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Throws(global::System.Func<object?[], global::System.Exception> exceptionFactory) => _inner.Throws(exceptionFactory);
public IReadWriter_Write_M2_TypedSetup Raises(string eventName, object? args = null) { _inner.Raises(eventName, args); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Raises(string eventName, object? args = null) => _inner.Raises(eventName, args);
public IReadWriter_Write_M2_TypedSetup SetsOutParameter(int paramIndex, object? value) { _inner.SetsOutParameter(paramIndex, value); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain SetsOutParameter(int paramIndex, object? value) => _inner.SetsOutParameter(paramIndex, value);
public IReadWriter_Write_M2_TypedSetup TransitionsTo(string stateName) { _inner.TransitionsTo(stateName); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain TransitionsTo(string stateName) => _inner.TransitionsTo(stateName);
public IReadWriter_Write_M2_TypedSetup Then() { _inner.Then(); return this; }

/// <summary>Execute a typed callback using the actual method parameters.</summary>
public global::TUnit.Mocks.Setup.IVoidSetupChain Callback(global::System.Action<string> callback)
public IReadWriter_Write_M2_TypedSetup Callback(global::System.Action<string> callback)
{
return _inner.Callback(args => callback((string)args[0]!));
_inner.Callback(args => callback((string)args[0]!));
return this;
}

/// <summary>Configure a typed computed exception using the actual method parameters.</summary>
public global::TUnit.Mocks.Setup.IVoidSetupChain Throws(global::System.Func<string, global::System.Exception> exceptionFactory)
public IReadWriter_Write_M2_TypedSetup Throws(global::System.Func<string, global::System.Exception> exceptionFactory)
{
return _inner.Throws(args => exceptionFactory((string)args[0]!));
_inner.Throws(args => exceptionFactory((string)args[0]!));
return this;
}
}
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
// <auto-generated/>
// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public readonly struct INotifier_MockEvents
{
internal readonly global::TUnit.Mocks.MockEngine<global::INotifier> Engine;

internal INotifier_MockEvents(global::TUnit.Mocks.MockEngine<global::INotifier> engine) => Engine = engine;
}

public static class INotifier_MockEventsExtensions
{
extension(global::TUnit.Mocks.Mock<global::INotifier> mock)
{
public INotifier_MockEvents Events => new(mock.Engine);
}

extension(INotifier_MockEvents events)
{
public global::TUnit.Mocks.EventSubscriptionAccessor ItemAdded
=> new(events.Engine, "ItemAdded");
}
}
}


// ===== FILE SEPARATOR =====

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
Expand Down Expand Up @@ -129,40 +160,61 @@ namespace TUnit.Mocks.Generated
}

[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public readonly struct INotifier_Notify_M0_TypedSetup : global::TUnit.Mocks.Setup.IVoidMethodSetup
public readonly struct INotifier_Notify_M0_TypedSetup : global::TUnit.Mocks.Setup.IVoidMethodSetup, global::TUnit.Mocks.Setup.IVoidSetupChain
{
private readonly global::TUnit.Mocks.Setup.VoidMethodSetupBuilder _inner;

internal INotifier_Notify_M0_TypedSetup(global::TUnit.Mocks.Setup.VoidMethodSetupBuilder inner) => _inner = inner;

global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidMethodSetup.Throws<TException>() => _inner.Throws<TException>();
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidMethodSetup.Throws(global::System.Exception exception) => _inner.Throws(exception);
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidMethodSetup.Callback(global::System.Action callback) => _inner.Callback(callback);
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidMethodSetup.Callback(global::System.Action<object?[]> callback) => _inner.Callback(callback);
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidMethodSetup.Throws(global::System.Func<object?[], global::System.Exception> exceptionFactory) => _inner.Throws(exceptionFactory);
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidMethodSetup.Raises(string eventName, object? args) => _inner.Raises(eventName, args);
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidMethodSetup.SetsOutParameter(int paramIndex, object? value) => _inner.SetsOutParameter(paramIndex, value);
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidMethodSetup.TransitionsTo(string stateName) => _inner.TransitionsTo(stateName);

global::TUnit.Mocks.Setup.IVoidMethodSetup global::TUnit.Mocks.Setup.IVoidSetupChain.Then() { _inner.Then(); return this; }
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidSetupChain.Raises(string eventName, object? args) => _inner.Raises(eventName, args);
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidSetupChain.SetsOutParameter(int paramIndex, object? value) => _inner.SetsOutParameter(paramIndex, value);
global::TUnit.Mocks.Setup.IVoidSetupChain global::TUnit.Mocks.Setup.IVoidSetupChain.TransitionsTo(string stateName) => _inner.TransitionsTo(stateName);

/// <inheritdoc />
public INotifier_Notify_M0_TypedSetup Throws<TException>() where TException : global::System.Exception, new() { _inner.Throws<TException>(); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Throws<TException>() where TException : global::System.Exception, new() => _inner.Throws<TException>();
public INotifier_Notify_M0_TypedSetup Throws(global::System.Exception exception) { _inner.Throws(exception); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Throws(global::System.Exception exception) => _inner.Throws(exception);
public INotifier_Notify_M0_TypedSetup Callback(global::System.Action callback) { _inner.Callback(callback); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Callback(global::System.Action callback) => _inner.Callback(callback);
public INotifier_Notify_M0_TypedSetup Callback(global::System.Action<object?[]> callback) { _inner.Callback(callback); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Callback(global::System.Action<object?[]> callback) => _inner.Callback(callback);
public INotifier_Notify_M0_TypedSetup Throws(global::System.Func<object?[], global::System.Exception> exceptionFactory) { _inner.Throws(exceptionFactory); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Throws(global::System.Func<object?[], global::System.Exception> exceptionFactory) => _inner.Throws(exceptionFactory);
public INotifier_Notify_M0_TypedSetup Raises(string eventName, object? args = null) { _inner.Raises(eventName, args); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain Raises(string eventName, object? args = null) => _inner.Raises(eventName, args);
public INotifier_Notify_M0_TypedSetup SetsOutParameter(int paramIndex, object? value) { _inner.SetsOutParameter(paramIndex, value); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain SetsOutParameter(int paramIndex, object? value) => _inner.SetsOutParameter(paramIndex, value);
public INotifier_Notify_M0_TypedSetup TransitionsTo(string stateName) { _inner.TransitionsTo(stateName); return this; }
/// <inheritdoc />
public global::TUnit.Mocks.Setup.IVoidSetupChain TransitionsTo(string stateName) => _inner.TransitionsTo(stateName);
public INotifier_Notify_M0_TypedSetup Then() { _inner.Then(); return this; }

/// <summary>Execute a typed callback using the actual method parameters.</summary>
public global::TUnit.Mocks.Setup.IVoidSetupChain Callback(global::System.Action<string> callback)
public INotifier_Notify_M0_TypedSetup Callback(global::System.Action<string> callback)
{
return _inner.Callback(args => callback((string)args[0]!));
_inner.Callback(args => callback((string)args[0]!));
return this;
}

/// <summary>Configure a typed computed exception using the actual method parameters.</summary>
public global::TUnit.Mocks.Setup.IVoidSetupChain Throws(global::System.Func<string, global::System.Exception> exceptionFactory)
public INotifier_Notify_M0_TypedSetup Throws(global::System.Func<string, global::System.Exception> exceptionFactory)
{
return _inner.Throws(args => exceptionFactory((string)args[0]!));
_inner.Throws(args => exceptionFactory((string)args[0]!));
return this;
}

/// <summary>Auto-raise the ItemAdded event when this method is called.</summary>
public INotifier_Notify_M0_TypedSetup RaisesItemAdded(string e) { _inner.Raises("ItemAdded", (object?)e); return this; }
}
}

Expand Down
Loading
Loading