コード例 #1
0
		public void ToString_CreateWarningMessage_ReturnsMessage ()
		{
			var message = new PackageOperationMessage (MessageLevel.Warning, "test");
			var text = message.ToString ();

			Assert.AreEqual ("test", text);
		}
コード例 #2
0
		public void ToString_CreateFormattedWarningMessage_ReturnsFormattedMessage ()
		{
			string format = "Test '{0}'.";
			var message = new PackageOperationMessage (MessageLevel.Warning, format, "A");
			var text = message.ToString ();

			var expectedText = "Test 'A'.";
			Assert.AreEqual (expectedText, text);
		}
コード例 #3
0
		public void Level_CreateWarningMessage_CreatesMessageWithMessageLevelSetToWarning ()
		{
			var message = new PackageOperationMessage (MessageLevel.Warning, "test");

			Assert.AreEqual (MessageLevel.Warning, message.Level);
		}
コード例 #4
0
		public void Level_CreateInfoMessage_CreatesMessageWithMessageLevelSetToInfo ()
		{
			var message = new PackageOperationMessage (MessageLevel.Info, "test");

			Assert.AreEqual (MessageLevel.Info, message.Level);
		}