blob: 718c898193da4461194127bf696ff98b46101316 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// -----------------------------------------------------------------------
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
namespace System.UnitTesting
{
public class ExpectationCollection<TInputAndOutput> : Collection<Expectation<TInputAndOutput>>
{
public void Add(TInputAndOutput inputAndOutput)
{
Add(inputAndOutput, inputAndOutput);
}
public void AddRange(IEnumerable<TInputAndOutput> inputAndOutputs)
{
foreach (TInputAndOutput inputAndOutput in inputAndOutputs)
{
Add(inputAndOutput);
}
}
public void Add(TInputAndOutput input, TInputAndOutput output)
{
Add(new Expectation<TInputAndOutput>(input, output));
}
}
}
|