public void InvalidArgAggregateTest()
        {
            IConversation      conversation = DummyConversationDataGenerator.GetSingleConversation(DummyPhoneNumberId.TonyWolfCell);
            GraphDataGenerator generator    = new GraphDataGenerator();

            generator.MessageCountAggregate(conversation, GraphAggregateType.Unknown);
        }
        public void InvalidArgPerUnitTimeTest()
        {
            IConversation      conversation = DummyConversationDataGenerator.GetSingleConversation(DummyPhoneNumberId.TonyWolfCell);
            GraphDataGenerator generator    = new GraphDataGenerator();

            generator.MessageCountPerUnitTime(conversation, GraphTimeUnit.Unknown);
        }
        public List <ITextGraphData> GetAggregateConversationGraphData(DummyPhoneNumberId DummyPhoneNumberId, GraphAggregateType aggregateType)
        {
            IConversation      conversation = DummyConversationDataGenerator.GetSingleConversation(DummyPhoneNumberId);
            GraphDataGenerator generator    = new GraphDataGenerator();

            return(new List <ITextGraphData>(generator.MessageCountAggregate(conversation, aggregateType)));
        }
        public List <ITextGraphData> GetConversationGraphData(DummyPhoneNumberId DummyPhoneNumberId, GraphTimeUnit timeUnit)
        {
            IConversation      conversation = DummyConversationDataGenerator.GetSingleConversation(DummyPhoneNumberId);
            GraphDataGenerator generator    = new GraphDataGenerator();

            return(new List <ITextGraphData>(generator.MessageCountPerUnitTime(conversation, timeUnit)));
        }
        public void EmptyPerUnitTimeTest()
        {
            IConversation      conversation = DummyConversationDataGenerator.GetSingleConversation(DummyPhoneNumberId.NeverTexterCell);
            GraphDataGenerator generator    = new GraphDataGenerator();

            ITextGraphDataCollection perMonthCollection = generator.MessageCountPerUnitTime(conversation, GraphTimeUnit.Month);

            Assert.AreEqual(0, perMonthCollection.Count);
        }
Beispiel #6
0
    private void AutomaticGraphGenerator()
    {
        GraphDataGenerator gdg = new GraphDataGenerator(currentState);
        Graph g = gdg.GenerateData(numberOfLevels);

        if (ComparationBetweenStates)
        {
            HashSet <WorldStateComparated> wsc = gdg.CompareWorldState();
        }
        new GraphGenerator(g).GenerateGraphML(liteGraph);
    }
        public void EmptyAggregateTest()
        {
            IConversation      conversation = DummyConversationDataGenerator.GetSingleConversation(DummyPhoneNumberId.NeverTexterCell);
            GraphDataGenerator generator    = new GraphDataGenerator();

            ITextGraphDataCollection hourOfDayCollection = generator.MessageCountAggregate(conversation, GraphAggregateType.HourOfDay);

            foreach (ITextGraphData graphData in hourOfDayCollection)
            {
                Assert.AreEqual(0, graphData.MessagesTotal);
            }

            ITextGraphDataCollection dayOfWeekCollection = generator.MessageCountAggregate(conversation, GraphAggregateType.DayOfWeek);

            foreach (ITextGraphData graphData in dayOfWeekCollection)
            {
                Assert.AreEqual(0, graphData.MessagesTotal);
            }
        }
        public void GetPerMonthDataNonSequentialTest()
        {
            MockConversation conversation = new MockConversation();

            conversation.AddMessage(new TextMessage(109, false, new DateTime(2010, 1, 15), "whatever1", "12125551424", CountryCallingCodeFinder.CountryAbbreviationUnitedStates));
            conversation.AddMessage(new TextMessage(110, false, new DateTime(2010, 2, 12), "whatever2", "12125551424", CountryCallingCodeFinder.CountryAbbreviationUnitedStates));
            conversation.AddMessage(new TextMessage(111, false, new DateTime(2010, 1, 8), "whatever3", "12125551424", CountryCallingCodeFinder.CountryAbbreviationUnitedStates));
            conversation.AddMessage(new TextMessage(112, false, new DateTime(2009, 12, 3), "whatever3", "12125551424", CountryCallingCodeFinder.CountryAbbreviationUnitedStates));

            GraphDataGenerator generator = new GraphDataGenerator();

            List <ITextGraphData> graphDataActual = new List <ITextGraphData>(generator.MessageCountPerUnitTime(conversation, GraphTimeUnit.Month));

            List <ITextGraphData> graphDataExpected = new List <ITextGraphData>();

            graphDataExpected.Add(new TextGraphData(new DateTime(2009, 12, 1), 1));
            graphDataExpected.Add(new TextGraphData(new DateTime(2010, 1, 1), 2));
            graphDataExpected.Add(new TextGraphData(new DateTime(2010, 2, 1), 1));

            VerifyGraphDataCollectionsEqual(graphDataExpected, graphDataActual);
        }
 /// <summary>
 /// Constructor
 /// </summary>
 public CoreController()
 {
     m_graphDataGenerator = new GraphDataGenerator();
 }