public void AreCompatible_VerifyCircularCompat() { var graph = new RuntimeGraph(new[] { new RuntimeDescription("win7", new[] { "win8" }), new RuntimeDescription("win8", new[] { "win7" }) }); graph.AreCompatible("win8", "win7").Should().BeTrue(); graph.AreCompatible("win7", "win8").Should().BeTrue(); }
public void AreCompatible_VerifyBasicOneWayCompat() { var graph = new RuntimeGraph(new[] { new RuntimeDescription("win7"), new RuntimeDescription("win8", new[] { "win7" }) }); graph.AreCompatible("win8", "win7").Should().BeTrue(); graph.AreCompatible("win7", "win8").Should().BeFalse(); }
public void AreCompatible_VerifyCompatThroughChain() { var graph = new RuntimeGraph(new[] { new RuntimeDescription("a"), new RuntimeDescription("b", new[] { "a" }), new RuntimeDescription("c", new[] { "b" }), new RuntimeDescription("d", new[] { "c" }) }); graph.AreCompatible("d", "a").Should().BeTrue(); }
public void ExpandRuntimes_UnknownRuntimeVerifyCompat() { var graph = new RuntimeGraph(); graph.AreCompatible("x", "x").Should().BeTrue(); }