Example #1
0
        public void GetUpdateDataFailedLogMessageText_DescriptorNull_ThrowsArgumentNullException()
        {
            // Setup
            var messageProvider = new ImportMessageProvider();

            // Call
            TestDelegate call = () => messageProvider.GetUpdateDataFailedLogMessageText(null);

            // Assert
            string paramName = Assert.Throws <ArgumentNullException>(call).ParamName;

            Assert.AreEqual("typeDescriptor", paramName);
        }
Example #2
0
        public void GetUpdateDataFailedLogMessageText_WithDescriptor_ReturnsExpectedMessage()
        {
            // Setup
            const string typeDescriptor  = "Items";
            var          messageProvider = new ImportMessageProvider();

            // Call
            string message = messageProvider.GetUpdateDataFailedLogMessageText(typeDescriptor);

            // Assert
            const string expectedMessage = "Het importeren van de items is mislukt: {0}. Geen gegevens gewijzigd.";

            Assert.AreEqual(expectedMessage, message);
        }