예제 #1
0
        public void ForksCount()
        {
            var se1 = new SportEvent
            {
            };

            var se2 = new SportEvent
            {
            };

            var forks = ForkHelper.GetFork(se1, se2);

            Assert.Equal(4, forks.Count);
        }
예제 #2
0
        public void Win1OrDrawVSwin2_No_Fork()
        {
            var se1 = new SportEvent
            {
                Win1OrDraw = 2f
            };

            var se2 = new SportEvent
            {
                Win2 = 2f
            };

            var forks = ForkHelper.GetFork(se1, se2);

            Assert.Empty(forks);
        }
예제 #3
0
        public void Win1VSwin2OrDraw_No_Fork()
        {
            var se1 = new SportEvent
            {
                Win1 = 2.5f
            };

            var se2 = new SportEvent
            {
                Win2OrDraw = 1
            };

            var forks = ForkHelper.GetFork(se1, se2);

            Assert.Empty(forks);
        }
예제 #4
0
        public void Win2VSwin1OrDraw_Fork()
        {
            var se1 = new SportEvent
            {
                Win2 = 4f
            };

            var se2 = new SportEvent
            {
                Win1OrDraw = 2f
            };

            var forks = ForkHelper.GetFork(se1, se2);

            Assert.Single(forks);

            var fork = forks[0];

            Assert.Same(se1, fork.SportEvent1);
            Assert.Equal(nameof(SportEvent.Win2), fork.SportEvent1Field);
            Assert.Same(se2, fork.SportEvent2);
            Assert.Equal(nameof(SportEvent.Win1OrDraw), fork.SportEvent2Field);
        }