示例#1
0
        public void Seat_nominal()
        {
            var examRoom = new ExamRoom(10);

            Assert.Equal(0, examRoom.Seat());
            Assert.Equal(9, examRoom.Seat());
            Assert.Equal(4, examRoom.Seat());
            Assert.Equal(6, examRoom.Seat());
        }
示例#2
0
        public void Test1()
        {
            var r = new ExamRoom(10);

            r.Seat().Should().Be(0);
            r.Seat().Should().Be(9);
            r.Seat().Should().Be(4);
            r.Seat().Should().Be(2);
            r.Leave(4);
            r.Seat().Should().Be(5);
        }
示例#3
0
        public void Test_case_0()
        {
            var examRoom = new ExamRoom(10);

            Assert.Equal(0, examRoom.Seat());
            Assert.Equal(9, examRoom.Seat());
            Assert.Equal(4, examRoom.Seat());
            Assert.Equal(2, examRoom.Seat());

            examRoom.Leave(4);
            Assert.Equal(5, examRoom.Seat());
        }
示例#4
0
        public void Leave_nominal()
        {
            var examRoom = new ExamRoom(10);

            Assert.Equal(0, examRoom.Seat());
            Assert.Equal(9, examRoom.Seat());
            Assert.Equal(4, examRoom.Seat());
            Assert.Equal(6, examRoom.Seat());

            examRoom.Leave(4);
            Assert.Equal(3, examRoom.Seat());
        }
示例#5
0
        public void Leave_at_boundaries()
        {
            var examRoom = new ExamRoom(10);

            Assert.Equal(0, examRoom.Seat());
            Assert.Equal(9, examRoom.Seat());
            Assert.Equal(4, examRoom.Seat());
            Assert.Equal(6, examRoom.Seat());

            examRoom.Leave(0);
            Assert.Equal(0, examRoom.Seat());
            examRoom.Leave(9);
            examRoom.Leave(6);
            Assert.Equal(9, examRoom.Seat());
        }