コード例 #1
0
        public void ToString_OpenClosed_ReturnCorrectDisplay()
        {
            var builder = new IntervalBuilder(" ] 10 ; 200]");
            builder.Build();
            var interval = builder.GetInterval();

            Assert.That(interval.ToString(), Is.EqualTo("]10;200]"));
        }
コード例 #2
0
        public void Build_OpenOpen_ReturnBothNotClosed()
        {
            var builder = new IntervalBuilder(" ] 10 ; 200[");
            builder.Build();
            var interval = builder.GetInterval();

            Assert.That(interval.Left.IsClosed, Is.False);
            Assert.That(interval.Right.IsClosed, Is.False);
        }
コード例 #3
0
        public void Build_OpenClosed_ReturnOpenClosed()
        {
            var builder = new IntervalBuilder(" ] 10 ; 200]");
            builder.Build();
            var interval = builder.GetInterval();

            Assert.That(interval.Left.IsOpen, Is.True);
            Assert.That(interval.Right.IsClosed, Is.True);
        }