public void TestCreateMatchesNoPeople()
        {
            var algo  = new StableMarriageMatchCreator(new System.Random(), new Dictionary <string, PersonData>(), 0);
            var match = algo.CreateMatches(new List <ChannelAccount>());

            Assert.AreEqual(0, match.Pairs.Count);
        }
        public void TestCreateMatchesFivePeople()
        {
            var algo = new StableMarriageMatchCreator(
                new System.Random(12345),
                new Dictionary <string, PersonData> {
                { "aaa", new PersonData()
                  {
                      Discipline = "design"
                  } },
                { "bbb", new PersonData()
                  {
                      Discipline = "engineering"
                  } },
                { "eee", new PersonData()
                  {
                      Discipline = "engineering"
                  } },
            },
                0);
            var match = algo.CreateMatches(new List <ChannelAccount> {
                new TeamsChannelAccount {
                    ObjectId = "aaa"
                },
                new TeamsChannelAccount {
                    ObjectId = "bbb"
                },
                new TeamsChannelAccount {
                    ObjectId = "ccc"
                },
                new TeamsChannelAccount {
                    ObjectId = "ddd"
                },
                new TeamsChannelAccount {
                    ObjectId = "eee"
                },
            });

            // System.Random(12345) shuffles to: a, b, e, c, d
            Assert.AreEqual(2, match.Pairs.Count);
            Assert.AreEqual("ddd", match.OddPerson.GetUserId());

            Assert.AreEqual("ccc", match.Pairs[0].Person2.GetUserId());
            Assert.AreEqual("eee", match.Pairs[1].Person2.GetUserId());
        }
        public void TestCreateMatchesOnePerson()
        {
            var algo = new StableMarriageMatchCreator(
                new System.Random(),
                new Dictionary <string, PersonData> {
                { "abc", new PersonData()
                  {
                      Discipline = "design"
                  } }
            },
                0);
            var match = algo.CreateMatches(new List <ChannelAccount> {
                new TeamsChannelAccount {
                    ObjectId = "abc"
                }
            });

            Assert.AreEqual(0, match.Pairs.Count);
            Assert.AreEqual("abc", match.OddPerson.GetUserId());
        }