public void VerifyThatHeaderArrayAssemblerPopulatesArraysAsExpected() { var assembler = new HeaderArrayAssembler(this.session.Object, this.iteration, this.participant, this.option); var contentArray = assembler.HeaderArray; Assert.AreEqual("Test Model", contentArray[0, 1]); Assert.AreEqual(1, contentArray[1, 1]); Assert.AreEqual("Option 1", contentArray[2, 1]); Assert.AreEqual("PREPARATION_PHASE", contentArray[3, 1]); Assert.AreEqual("System", contentArray[4, 1]); Assert.AreEqual("John Doe", contentArray[5, 1]); }
/// <summary> /// collect the information that is to be written to the <see cref="Requirement"/> sheet /// </summary> /// <param name="session"> /// The active <see cref="ISession"/> /// </param> /// <param name="iteration"> /// The <see cref="Iteration"/> that contains the <see cref="Requirement"/>s that need to be generated /// </param> /// <param name="participant"> /// The <see cref="Participant"/> that is generating the <see cref="Worksheet"/> /// </param> private void PopulateSheetArrays(ISession session, Iteration iteration, Participant participant) { var requirements = iteration.RequirementsSpecification.SelectMany(x => x.Requirement).Where(x => !x.IsDeprecated);; var requirementArrayAssembler = new RequirementArrayAssembler(requirements); this.requirementContent = requirementArrayAssembler.ContentArray; var headerArrayAssembler = new HeaderArrayAssembler(session, iteration, participant); this.headerFormat = headerArrayAssembler.FormatArray; this.headerContent = headerArrayAssembler.HeaderArray; }
public void VerifyThatAssemblerPopulatesArrays() { var headerArrayAssembler = new HeaderArrayAssembler(this.session.Object, this.iteration, this.participant); var headerArray = headerArrayAssembler.HeaderArray; Assert.AreEqual(this.engineeringModel.EngineeringModelSetup.Name, headerArray[0, 2]); Assert.AreEqual(this.iteration.IterationSetup.IterationNumber, headerArray[1, 2]); Assert.AreEqual(this.engineeringModel.EngineeringModelSetup.StudyPhase.ToString(), headerArray[2, 2]); Tuple <DomainOfExpertise, Participant> tuple; this.session.Object.OpenIterations.TryGetValue(this.iteration, out tuple); Assert.AreEqual(tuple.Item1.Name, headerArray[3, 2]); Assert.AreEqual(string.Format("{0} {1}", this.participant.Person.GivenName, this.participant.Person.Surname), headerArray[4, 2]); }
public void Verify_that_HeaderArray_is_populated_as_expected() { var headerArrayAssembler = new HeaderArrayAssembler(this.session.Object, this.iteration, this.participant); Assert.That(headerArrayAssembler.HeaderArray[0, 0], Is.EqualTo("Engineering Model:")); Assert.That(headerArrayAssembler.HeaderArray[1, 0], Is.EqualTo("Iteration number:")); Assert.That(headerArrayAssembler.HeaderArray[2, 0], Is.EqualTo("Domain:")); Assert.That(headerArrayAssembler.HeaderArray[3, 0], Is.EqualTo("User:"******"Generation Date:")); Assert.That(headerArrayAssembler.HeaderArray[0, 2], Is.EqualTo("Test [TST]")); Assert.That(headerArrayAssembler.HeaderArray[1, 2], Is.EqualTo(1)); Assert.That(headerArrayAssembler.HeaderArray[2, 2], Is.EqualTo("System [SYS]")); Assert.That(headerArrayAssembler.HeaderArray[3, 2], Is.EqualTo("John Doe")); Assert.That(headerArrayAssembler.HeaderArray[4, 2], Is.Not.Null); }