Esempio n. 1
0
        public void ConvertClassToDictionaryExtensionTest()
        {
            //Arrange
            var sampleClass = new SampleClass();

            //Act
            var dictionary = sampleClass.ConvertC2D();
            var result     = string.Join(", ", dictionary.Select(m => m.Key + ":" + m.Value).ToArray());

            //Assert
            Assert.IsTrue(result == "Id:1, FirstName:Tom, LastName:Swift, Company:Swift Enterprises");
        }
Esempio n. 2
0
		public void ConvertClassToDictionaryExtensionTest()
		{
			//Arrange
			var sampleClass= new SampleClass();

			//Act
			var dictionary = sampleClass.ConvertC2D();
			var result = string.Join(", ", dictionary.Select(m => m.Key + ":" + m.Value).ToArray());

			//Assert
			Assert.IsTrue(result == "Id:1, FirstName:Tom, LastName:Swift, Company:Swift Enterprises");
		}