Question
I'm trying to write a unit test in C#.NET in the class below im formatting a message and im printing this message as showed below.
I'm trying to write a unit test in C#.NET in the class below im formatting a message and im printing this message as showed below. im grouping the items in {} as shown. this class will get a message that has the {} attributes but in this class im inheriting from Comman class where im formatting the message the way I have showen below. Can you write a unit test that will test if I the message formatted in CopyDocumentHistory class will match the unit test format. kinda like Assert.AreEqual()?
namespace Historian.Commands {
public class CopyDocumentHistory : Command { //Command is an abstract class contains properties: ClientUserName, ClientAppId, SourceLoanNumber, DetinationLoanNumber
public override string FormattedText() { //method to format a message returning a string
return $"Copied by {ClientUserName} using application {ClientAppId} from loan {SourceLoanNumber} to loan {DestinationLoanNumber}"; //the formatted message
}
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started