Skip to content
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public sealed class IReadWriter_Mock : global::TUnit.Mocks.Mock<global::IReadWriter>, global::IReadWriter
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public IReadWriter_Mock(global::IReadWriter mockObject, global::TUnit.Mocks.MockEngine<global::IReadWriter> engine)
: base(mockObject, engine) { }

void global::IReadWriter.Flush()
{
Object.Flush();
}

string global::IReader.Read() => Object.Read();

void global::IWriter.Write(string data)
{
Object.Write(data);
}
}
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
internal static class IReadWriter_MockFactory
Expand All @@ -17,7 +45,7 @@ namespace TUnit.Mocks.Generated
var engine = new global::TUnit.Mocks.MockEngine<global::IReadWriter>(behavior);
var impl = new IReadWriter_MockImpl(engine);
engine.Raisable = impl;
var mock = new global::TUnit.Mocks.Mock<global::IReadWriter>(impl, engine);
var mock = new IReadWriter_Mock(impl, engine);
return mock;
}
}
Expand Down Expand Up @@ -174,6 +202,29 @@ namespace TUnit.Mocks.Generated
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public static class IReadWriter_MockStaticExtension
{
extension(global::IReadWriter)
{
public static IReadWriter_Mock Mock(global::TUnit.Mocks.MockBehavior behavior = global::TUnit.Mocks.MockBehavior.Loose)
{
var engine = new global::TUnit.Mocks.MockEngine<global::IReadWriter>(behavior);
var impl = new IReadWriter_MockImpl(engine);
engine.Raisable = impl;
return new IReadWriter_Mock(impl, engine);
}
}
}
}


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

// <auto-generated/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public sealed class IAsyncService_Mock : global::TUnit.Mocks.Mock<global::IAsyncService>, global::IAsyncService
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public IAsyncService_Mock(global::IAsyncService mockObject, global::TUnit.Mocks.MockEngine<global::IAsyncService> engine)
: base(mockObject, engine) { }

global::System.Threading.Tasks.Task<string> global::IAsyncService.GetValueAsync(string key) => Object.GetValueAsync(key);

global::System.Threading.Tasks.Task global::IAsyncService.DoWorkAsync() => Object.DoWorkAsync();

global::System.Threading.Tasks.ValueTask<int> global::IAsyncService.ComputeAsync(int input) => Object.ComputeAsync(input);

global::System.Threading.Tasks.ValueTask global::IAsyncService.InitializeAsync(global::System.Threading.CancellationToken ct) => Object.InitializeAsync(ct);
}
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
internal static class IAsyncService_MockFactory
Expand All @@ -17,7 +41,7 @@ namespace TUnit.Mocks.Generated
var engine = new global::TUnit.Mocks.MockEngine<global::IAsyncService>(behavior);
var impl = new IAsyncService_MockImpl(engine);
engine.Raisable = impl;
var mock = new global::TUnit.Mocks.Mock<global::IAsyncService>(impl, engine);
var mock = new IAsyncService_Mock(impl, engine);
return mock;
}
}
Expand Down Expand Up @@ -491,6 +515,29 @@ namespace TUnit.Mocks.Generated
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public static class IAsyncService_MockStaticExtension
{
extension(global::IAsyncService)
{
public static IAsyncService_Mock Mock(global::TUnit.Mocks.MockBehavior behavior = global::TUnit.Mocks.MockBehavior.Loose)
{
var engine = new global::TUnit.Mocks.MockEngine<global::IAsyncService>(behavior);
var impl = new IAsyncService_MockImpl(engine);
engine.Raisable = impl;
return new IAsyncService_Mock(impl, engine);
}
}
}
}


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

// <auto-generated/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public sealed class INotifier_Mock : global::TUnit.Mocks.Mock<global::INotifier>, global::INotifier
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public INotifier_Mock(global::INotifier mockObject, global::TUnit.Mocks.MockEngine<global::INotifier> engine)
: base(mockObject, engine) { }

void global::INotifier.Notify(string message)
{
Object.Notify(message);
}

event global::System.EventHandler<string> global::INotifier.ItemAdded { add => Object.ItemAdded += value; remove => Object.ItemAdded -= value; }
}
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
Expand Down Expand Up @@ -48,7 +71,7 @@ namespace TUnit.Mocks.Generated
var engine = new global::TUnit.Mocks.MockEngine<global::INotifier>(behavior);
var impl = new INotifier_MockImpl(engine);
engine.Raisable = impl;
var mock = new global::TUnit.Mocks.Mock<global::INotifier>(impl, engine);
var mock = new INotifier_Mock(impl, engine);
return mock;
}
}
Expand Down Expand Up @@ -212,6 +235,29 @@ namespace TUnit.Mocks.Generated
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public static class INotifier_MockStaticExtension
{
extension(global::INotifier)
{
public static INotifier_Mock Mock(global::TUnit.Mocks.MockBehavior behavior = global::TUnit.Mocks.MockBehavior.Loose)
{
var engine = new global::TUnit.Mocks.MockEngine<global::INotifier>(behavior);
var impl = new INotifier_MockImpl(engine);
engine.Raisable = impl;
return new INotifier_Mock(impl, engine);
}
}
}
}


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

// <auto-generated/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public sealed class IRepository_Mock : global::TUnit.Mocks.Mock<global::IRepository>, global::IRepository
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public IRepository_Mock(global::IRepository mockObject, global::TUnit.Mocks.MockEngine<global::IRepository> engine)
: base(mockObject, engine) { }

T global::IRepository.GetById<T>(int id) where T : class => Object.GetById<T>(id);

void global::IRepository.Save<T>(T entity) where T : class, new()
{
Object.Save<T>(entity);
}

TResult global::IRepository.Transform<TInput, TResult>(TInput input) where TInput : notnull where TResult : struct => Object.Transform<TInput, TResult>(input);
}
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
internal static class IRepository_MockFactory
Expand All @@ -17,7 +42,7 @@ namespace TUnit.Mocks.Generated
var engine = new global::TUnit.Mocks.MockEngine<global::IRepository>(behavior);
var impl = new IRepository_MockImpl(engine);
engine.Raisable = impl;
var mock = new global::TUnit.Mocks.Mock<global::IRepository>(impl, engine);
var mock = new IRepository_Mock(impl, engine);
return mock;
}
}
Expand Down Expand Up @@ -118,6 +143,29 @@ namespace TUnit.Mocks.Generated
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public static class IRepository_MockStaticExtension
{
extension(global::IRepository)
{
public static IRepository_Mock Mock(global::TUnit.Mocks.MockBehavior behavior = global::TUnit.Mocks.MockBehavior.Loose)
{
var engine = new global::TUnit.Mocks.MockEngine<global::IRepository>(behavior);
var impl = new IRepository_MockImpl(engine);
engine.Raisable = impl;
return new IRepository_Mock(impl, engine);
}
}
}
}


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

// <auto-generated/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public sealed class ITest_Mock : global::TUnit.Mocks.Mock<global::ITest>, global::ITest
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public ITest_Mock(global::ITest mockObject, global::TUnit.Mocks.MockEngine<global::ITest> engine)
: base(mockObject, engine) { }

void global::ITest.Test(string @event)
{
Object.Test(@event);
}

string global::ITest.Get(int @class, string @return) => Object.Get(@class, @return);
}
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
internal static class ITest_MockFactory
Expand All @@ -17,7 +40,7 @@ namespace TUnit.Mocks.Generated
var engine = new global::TUnit.Mocks.MockEngine<global::ITest>(behavior);
var impl = new ITest_MockImpl(engine);
engine.Raisable = impl;
var mock = new global::TUnit.Mocks.Mock<global::ITest>(impl, engine);
var mock = new ITest_Mock(impl, engine);
return mock;
}
}
Expand Down Expand Up @@ -265,6 +288,29 @@ namespace TUnit.Mocks.Generated
}


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

// <auto-generated/>
#nullable enable

namespace TUnit.Mocks.Generated
{
public static class ITest_MockStaticExtension
{
extension(global::ITest)
{
public static ITest_Mock Mock(global::TUnit.Mocks.MockBehavior behavior = global::TUnit.Mocks.MockBehavior.Loose)
{
var engine = new global::TUnit.Mocks.MockEngine<global::ITest>(behavior);
var impl = new ITest_MockImpl(engine);
engine.Raisable = impl;
return new ITest_Mock(impl, engine);
}
}
}
}


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

// <auto-generated/>
Expand Down
Loading
Loading