public void FullyContains() { var region = new CallSomaticVariants.Logic.RegionState.Region(5, 10); Assert.True(region.FullyContains(new CallSomaticVariants.Logic.RegionState.Region(5, 10))); Assert.True(region.FullyContains(new CallSomaticVariants.Logic.RegionState.Region(6, 10))); Assert.True(region.FullyContains(new CallSomaticVariants.Logic.RegionState.Region(5, 5))); Assert.False(region.FullyContains(new CallSomaticVariants.Logic.RegionState.Region(4, 5))); Assert.False(region.FullyContains(new CallSomaticVariants.Logic.RegionState.Region(10, 11))); }
public void Overlaps() { var region = new CallSomaticVariants.Logic.RegionState.Region(5, 10); Assert.True(region.Overlaps(new CallSomaticVariants.Logic.RegionState.Region(5, 10))); Assert.True(region.Overlaps(new CallSomaticVariants.Logic.RegionState.Region(6, 10))); Assert.True(region.Overlaps(new CallSomaticVariants.Logic.RegionState.Region(5, 5))); Assert.True(region.Overlaps(new CallSomaticVariants.Logic.RegionState.Region(4, 5))); Assert.True(region.Overlaps(new CallSomaticVariants.Logic.RegionState.Region(10, 11))); Assert.False(region.Overlaps(new CallSomaticVariants.Logic.RegionState.Region(4, 4))); Assert.False(region.Overlaps(new CallSomaticVariants.Logic.RegionState.Region(11, 11))); }
public void Union() { var region = new CallSomaticVariants.Logic.RegionState.Region(5, 10); Assert.Equal(new CallSomaticVariants.Logic.RegionState.Region(5, 10), region.Merge(new CallSomaticVariants.Logic.RegionState.Region(5, 10))); Assert.Equal(new CallSomaticVariants.Logic.RegionState.Region(4, 10), region.Merge(new CallSomaticVariants.Logic.RegionState.Region(4, 5))); Assert.Equal(new CallSomaticVariants.Logic.RegionState.Region(5, 11), region.Merge(new CallSomaticVariants.Logic.RegionState.Region(10, 11))); // no overlap Assert.Equal(null, region.Merge(new CallSomaticVariants.Logic.RegionState.Region(4, 4))); Assert.Equal(null, region.Merge(new CallSomaticVariants.Logic.RegionState.Region(11, 11))); }