Exemple #1
0
        public void GivenCase_WhenConfirmed_ThenCurrentCaseStatusMustBeDerived()
        {
            var complaint = new CaseBuilder(this.Session).WithDescription("Complaint").Build();

            this.Session.Derive();

            Assert.Equal(1, complaint.AllVersions.Count);
            Assert.Equal(new CaseStates(this.Session).Opened, complaint.CaseState);

            complaint.AppsClose();

            this.Session.Derive();

            Assert.Equal(2, complaint.AllVersions.Count);
            Assert.Equal(new CaseStates(this.Session).Closed, complaint.CaseState);
        }
Exemple #2
0
        public void GivenCase_WhenConfirmed_ThenCurrentCaseStatusMustBeDerived()
        {
            var complaint = new CaseBuilder(this.DatabaseSession).WithDescription("Complaint").Build();

            this.DatabaseSession.Derive(true);

            Assert.AreEqual(1, complaint.CaseStatuses.Count);
            Assert.AreEqual(new CaseObjectStates(this.DatabaseSession).Opened, complaint.CurrentCaseStatus.CaseObjectState);

            complaint.AppsClose();

            this.DatabaseSession.Derive(true);

            Assert.AreEqual(2, complaint.CaseStatuses.Count);
            Assert.AreEqual(new CaseObjectStates(this.DatabaseSession).Closed, complaint.CurrentCaseStatus.CaseObjectState);
        }