-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMinSTCutNaiveTests.cs
More file actions
36 lines (31 loc) · 902 Bytes
/
MinSTCutNaiveTests.cs
File metadata and controls
36 lines (31 loc) · 902 Bytes
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
31
32
33
34
35
36
using System;
using AlgorithmsAndDataStructures.Algorithms.Graph.MinCut;
using Xunit;
namespace AlgorithmsAndDataStructures.Tests.Algorithm.Graph.MaxFlow;
public class MinStCutNaiveTests
{
[Fact]
public void Baseline()
{
var sut = new MinStCutNaive();
var graph = new int[4][];
graph[0] = new[] { 0, 1, 1, 1 };
graph[1] = new[] { 1, 0, 0, 1 };
graph[2] = new[] { 1, 0, 0, 1 };
graph[3] = new[] { 1, 1, 1, 0 };
var minCut = sut.GetStCut(graph);
Assert.Collection(minCut,
arg =>
{
var (item1, item2) = arg;
Assert.Equal(0, item1);
Assert.Equal(1, item2);
},
arg =>
{
var (item1, item2) = arg;
Assert.Equal(3, item1);
Assert.Equal(1, item2);
});
}
}