Disjoint() public method

public Disjoint ( CustomSet, right ) : bool
right CustomSet,
return bool
Exemplo n.º 1
0
    public void Sets_are_disjoint_if_they_share_no_elements()
    {
        var set2 = new CustomSet(new[] { 3, 4 });
        var sut  = new CustomSet(new[] { 1, 2 });

        Assert.True(sut.Disjoint(set2));
    }
Exemplo n.º 2
0
    public void Non_empty_set_is_disjoint_with_empty_set()
    {
        var set2 = new CustomSet();
        var sut  = new CustomSet(new[] { 1 });

        Assert.True(sut.Disjoint(set2));
    }
Exemplo n.º 3
0
    public void Sets_are_not_disjoint_if_they_share_an_element()
    {
        var set2 = new CustomSet(new[] { 2, 3 });
        var sut  = new CustomSet(new[] { 1, 2 });

        Assert.False(sut.Disjoint(set2));
    }
Exemplo n.º 4
0
    public void The_empty_set_is_disjoint_with_itself()
    {
        var set2 = new CustomSet();
        var sut  = new CustomSet();

        Assert.True(sut.Disjoint(set2));
    }