mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 19:54:59 +00:00
Implement basic unit test infrastructure with abstraction patterns
Co-authored-by: ngenovese11 <23391587+ngenovese11@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Tests.Abstractions
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstraction for queue operations to enable testing
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of items in the queue</typeparam>
|
||||
public interface IQueue<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of items in the queue
|
||||
/// </summary>
|
||||
int Count { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Adds an item to the queue
|
||||
/// </summary>
|
||||
/// <param name="item">Item to add</param>
|
||||
void Enqueue(T item);
|
||||
|
||||
/// <summary>
|
||||
/// Removes and returns the next item from the queue
|
||||
/// </summary>
|
||||
/// <returns>The next item, or default(T) if queue is empty</returns>
|
||||
T Dequeue();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user