public void CreateBug_Should_ReturnCorrectInstance() { //Arrange var factory = new WimFactory(); var title = "ExampleBug"; var mockPerson = new Mock <IMember>(); IList <string> stepsToReproduce = new List <string>() { "1. ExampleStepOne", "2.ExampleStepTwo" }; var descritpion = "Example Description"; //Act var sut = factory.CreateBug(title, Priority.High, Severity.Minor, mockPerson.Object, stepsToReproduce, descritpion); //Assert Assert.IsInstanceOfType(sut, typeof(Bug)); }
public void Constructor_Should_AssignsCorrectTitle() { //Arrange var factory = new WimFactory(); var title = "ExampleBug"; var mockPerson = new Mock <IMember>(); IList <string> stepsToReproduce = new List <string>() { "1. ExampleStepOne", "2.ExampleStepTwo" }; var descritpion = "Example Description"; //Act var sut = factory.CreateBug(title, Priority.High, Severity.Minor, mockPerson.Object, stepsToReproduce, descritpion); //Assert Assert.AreEqual(sut.Title, title); }
public void Constructor_Should_AssignsCorrectStepsToReproduce() { //Arrange var factory = new WimFactory(); var title = "ExampleBug"; var severityToAssign = Severity.Minor; var mockPerson = new Mock <IMember>(); IList <string> stepsToReproduce = new List <string>() { "1. ExampleStepOne", "2.ExampleStepTwo" }; var descritpion = "Example Description"; //Act var sut = factory.CreateBug(title, Priority.Low, severityToAssign, mockPerson.Object, stepsToReproduce, descritpion); //Assert Assert.IsTrue(sut.StepsToReproduce.SequenceEqual(stepsToReproduce)); }