Subset() 공개 메소드

public Subset ( CustomSet, right ) : bool
right CustomSet,
리턴 bool
예제 #1
0
    public void Set_is_not_a_subset_of_set_that_does_not_contain_its_elements()
    {
        var set2 = new CustomSet(new[] { 4, 1, 3 });
        var sut  = new CustomSet(new[] { 1, 2, 3 });

        Assert.False(sut.Subset(set2));
    }
예제 #2
0
    public void Set_is_a_subset_of_larger_set_with_same_elements()
    {
        var set2 = new CustomSet(new[] { 4, 1, 2, 3 });
        var sut  = new CustomSet(new[] { 1, 2, 3 });

        Assert.True(sut.Subset(set2));
    }
예제 #3
0
    public void Empty_set_is_a_subset_of_non_empty_set()
    {
        var set2 = new CustomSet(new[] { 1 });
        var sut  = new CustomSet();

        Assert.True(sut.Subset(set2));
    }
예제 #4
0
    public void Non_empty_set_is_not_a_subset_of_empty_set()
    {
        var set2 = new CustomSet();
        var sut  = new CustomSet(new[] { 1 });

        Assert.False(sut.Subset(set2));
    }
예제 #5
0
    public void Empty_set_is_a_subset_of_another_empty_set()
    {
        var set2 = new CustomSet();
        var sut  = new CustomSet();

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