コード例 #1
0
        public void RemoveLanguageTest_ReturnsFalseIfNotExists()
        {
            //Arrange
            LanguageSqlDAL dal          = new LanguageSqlDAL(connectionString);
            Language       deadLanguage = new Language()
            {
                CountryCode = "ABC",
                Name        = "Nonexistent-Language"
            };

            //Act
            bool didRemove = dal.RemoveLanguage(deadLanguage);

            //Assert
            Assert.IsFalse(didRemove);
        }
コード例 #2
0
        public void RemoveLanguageTest_ReturnsTrueIfExists()
        {
            //Arrange
            LanguageSqlDAL dal          = new LanguageSqlDAL(connectionString);
            Language       deadLanguage = new Language()
            {
                CountryCode = "ABC",
                Name        = "OfficialLanguage"
            };

            //Act
            bool didRemove = dal.RemoveLanguage(deadLanguage);

            //Assert
            Assert.IsTrue(didRemove);
        }