public void Can_PrettyFormat_generic_type()
		{
			var model = new ModelWithIdAndName { Id = 1, Name = "Name" };
			var modelStr = model.Dump();

			Assert.That(modelStr, Is.EqualTo("{\r\n\tId: 1,\r\n\tName: Name\r\n}"));
		}
		public void Can_PrettyFormat_object()
		{
			object model = new ModelWithIdAndName { Id = 1, Name = "Name" };
			var modelStr = model.Dump();

			Console.WriteLine(modelStr);

			Assert.That(modelStr, Is.EqualTo("{\r\n\tId: 1,\r\n\tName: Name\r\n}"));
		}
Пример #3
0
		public void Can_PrettyFormat_generic_type()
		{
			var model = new ModelWithIdAndName { Id = 1, Name = "Name" };
			var modelStr = model.Dump();

			Assert.That(modelStr, 
			            Is.EqualTo(
							"{"
							+ Environment.NewLine
							+ "\tId: 1,"
							+ Environment.NewLine
							+ "\tName: Name"
							+ Environment.NewLine
							+ "}"
						));
		}
Пример #4
0
		public void Can_PrettyFormat_object()
		{
			object model = new ModelWithIdAndName { Id = 1, Name = "Name" };
			var modelStr = model.Dump();

			Console.WriteLine(modelStr);

			Assert.That(modelStr, 
			            Is.EqualTo(
							"{"
							+ Environment.NewLine
			           		+ "\tId: 1,"
							+ Environment.NewLine
							+"\tName: Name"
							+ Environment.NewLine
							+ "}"
						));
		}