Beispiel #1
0
        public void Test3()
        {
            string input = "^v^v^v^v^v";

            SantaMap sm = new SantaMap();

            input.ToCharArray().ToList().ForEach(c => sm.AddHouse(c));

            Assert.AreEqual(2, sm.visitedHouses.Count);
        }
Beispiel #2
0
        public void CreateSantaMap(string giftee, string santa)
        {
            var santaUser  = this.GetUser(santa);
            var gifteeUser = this.GetUser(giftee);

            if (santaUser == null || gifteeUser == null)
            {
                throw new InvalidDataException($"One of the given values is null. {nameof(gifteeUser)}:{gifteeUser}, {nameof(santaUser)}:{santaUser}");
            }

            var santaMap = new SantaMap(giftee, santa);

            this.InsertEntity(santaMap);

            this.SetUserRoll(santaUser.Name, santaUser.Email, true);
        }