public void CreateIncidentItemList_MultipleIncidents_UnitOnlyShownForAssignedIncidents()
        {
            var units1String =
                File.ReadAllText(TestContext.CurrentContext.TestDirectory + "..\\TestResources\\units1.json");
            var incidents1String =
                File.ReadAllText(TestContext.CurrentContext.TestDirectory + "..\\TestResources\\incidents1.json");

            var units     = ReadJObjectList(units1String);
            var incidents = ReadJObjectList(incidents1String);

            var incidentItemList = IncidentItemFactory.CreateIncidentItemList(incidents, units, new List <JObject>());

            var expectedItem1 = CreateExpectedItem1();
            var expectedItem2 = CreateExpectedItem2();

            Assert.Contains(expectedItem1, incidentItemList, "Expected first incident with both units in result.");
            Assert.Contains(expectedItem2, incidentItemList, "Expected second incident only with own unit in results.");
        }
Beispiel #2
0
        private void UpdateIncidentItemList(List <JObject> incidents, List <JObject> units, List <JObject> oneTimeActionJsonObjects)
        {
            var incidentItemList = IncidentItemFactory.CreateIncidentItemList(incidents, units, oneTimeActionJsonObjects);

            _incidentUpdateRegistry.IncidentsUpdated(incidentItemList);
        }