|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Matching.Expressions;
namespace Matching.Tests
{
[TestClass]
public class ScenarioTests
{
[TestMethod]
public void Scenario01Test()
{
var root = new AndMatchingExpression(
new OrMatchingExpression(
new int[] { 5, 7, 9, 12, 13 },
new int[] { 3, 4, 8, 10, 12 }
),
new OrMatchingExpression(
new int[] { 7, 8, 13 },
new int[] { 8, 9, 14 }
)
);
var result = root.ToArray();
foreach (var item in result)
Console.WriteLine(item);
CollectionAssert.AreEqual(result.ToList(), new List<int>(new int[] { 7, 8, 9, 13 }));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.