Пример #1
0
        // Seed Method
        private void SeedBadges()
        {
            KomodoBadge badge1 = new KomodoBadge(12345, new List <string> {
                "A7"
            });
            KomodoBadge badge2 = new KomodoBadge(22345, new List <string> {
                "A1", "A4", "B1", "B2"
            });
            KomodoBadge badge3 = new KomodoBadge(32345, new List <string> {
                "A4", "A5"
            });

            _badgeRepo.AddToDatabase(badge1);
            _badgeRepo.AddToDatabase(badge2);
            _badgeRepo.AddToDatabase(badge3);
        }
Пример #2
0
        public void AddToDictionary_ShouldNotGetNull()
        {
            KomodoBadge badge = new KomodoBadge();

            badge.BadgeID = int.Parse("01");
            KomodoBadgeRepo repo = new KomodoBadgeRepo();

            repo.AddToDatabase(badge);
            KomodoBadge badgeFromDatabase = repo.GetBadgeByDictKey(01);

            Assert.IsNotNull(badgeFromDatabase);
        }