예제 #1
0
        public void FlushTest_new()
        {
            Diagramm target = new Diagramm();
            target.flush();

            //no Exception should occur
        }
예제 #2
0
        public void CloneTest1()
        {
            Diagramm target = new Diagramm();
            object actual;
            actual = target.Clone();

            Assert.AreNotSame(target, actual, "Cloned diagram is same object as origin.");
        }
예제 #3
0
        public void CloneTest()
        {
            Diagramm target = new Diagramm();
            object actual;
            actual = target.createExtraPluginInstance();

            Assert.AreNotSame(target, actual, "Created diagram instance is same object as origin.");
        }
예제 #4
0
        public void getMementoTest()
        {
            Diagramm target = new Diagramm();
            Memento expected = new Memento("Diagram_settings", null);
            Memento actual;
            actual = target.getMemento();

            Assert.IsNotNull(actual, "Memento could not be loaded");
            Assert.AreEqual(expected.name, actual.name);
            Assert.AreEqual(expected.mementoPath, actual.mementoPath);
            Assert.AreEqual(expected.state, actual.state, "Has Memento for PP_Diagram been implemented? Adapt testcode!");
        }
예제 #5
0
        public void typeTest()
        {
            Diagramm target = new Diagramm(); // TODO: Passenden Wert initialisieren
            PluginType actual;
            actual = target.type;

            Assert.AreEqual<PluginType>(PluginType.IPresentation, actual);
        }
예제 #6
0
        public void setVideoTest_nullProcessedBy()
        {
            Diagramm target = new Diagramm();
            bool isAnalysis = true;
            string vidPath = "";
            IVideoInfo vinfo = null;
            List<IMacroEntry> processedBy = null;
            Video video = new Video(isAnalysis, vidPath, vinfo, processedBy);

            float[][] data = new float[2][];
            data[0] = new float[5] { 1, 2, 3, 4, 5 };
            data[1] = new float[5] { 1, 2, 3, 4, 5 };
            video.frameMetricValue = data;

            target.setVideo(video);
            //assert: no exception
        }
예제 #7
0
        public void threadSafeTest()
        {
            Diagramm target = new Diagramm();
            bool expected = false;
            bool actual;
            actual = target.threadSafe;

            Assert.AreEqual<bool>(expected, actual);
        }
예제 #8
0
 public void setVideoTest_null()
 {
     Diagramm target = new Diagramm();
     IVideo video = null;
     target.setVideo(video);
 }
예제 #9
0
        public void setVideoTest_nulldata()
        {
            Diagramm target = new Diagramm();
            bool isAnalysis = true;
            string vidPath = "";
            IVideoInfo vinfo = null;
            List<IMacroEntry> processedBy = new List<IMacroEntry>();
            MacroEntry macroEntry = new Oqat.ViewModel.MacroPlugin.MacroEntry("TestPlugin", PluginType.IMetricOqat, "TestMemento");
            processedBy.Add(macroEntry);
            Video video = new Video(isAnalysis, vidPath, vinfo, processedBy);

            target.setVideo(video);
            //assert: no exception
        }
예제 #10
0
        public void setVideoTest_emptyData()
        {
            Diagramm target = new Diagramm();
            bool isAnalysis = true;
            string vidPath = "";
            IVideoInfo vinfo = null;
            List<IMacroEntry> processedBy = new List<IMacroEntry>();
            MacroEntry macroEntry = new MacroEntry("TestPlugin", PluginType.IMetricOqat, "TestMemento");
            processedBy.Add(macroEntry);
            Video video = new Video(isAnalysis, vidPath, vinfo, processedBy);

            float[][] data = new float[2][];
            data[0] = new float[5];
            data[1] = new float[5];
            video.frameMetricValue = data;

            target.setVideo(video);
            //assert: no exception
        }
예제 #11
0
        public void setVideoTest_data()
        {
            Diagramm target = new Diagramm();
            bool isAnalysis = true;
            string vidPath = "";
            IVideoInfo vinfo = null;
            List<IMacroEntry> processedBy = new List<IMacroEntry>();
            MacroEntry macroEntry = new MacroEntry("TestPlugin", PluginType.IMetricOqat, "TestMemento");
            processedBy.Add(macroEntry);
            Video video = new Video(isAnalysis, vidPath, vinfo, processedBy);

            float[][] data = new float[2][];
            data[0] = new float[5] { 1, 2, 3, 4, 5 };
            data[1] = new float[5] { 1, 2, 3, 4, 5 };
            video.frameMetricValue = data;

            target.setVideo(video);
            //assert: no exception
            //GUI should show the diagram now >> (automated?) UI test

            target.flush();
            //assert: no exception
            //GUI should be flushed now >> (automated?) UI test
        }
예제 #12
0
        public void setMementoTest()
        {
            Diagramm target = new Diagramm(); // TODO: Passenden Wert initialisieren
            Memento memento = null; // TODO: Passenden Wert initialisieren
            target.setMemento(memento);

            //setMemento has not been implemented
            //if it should be used in the future, adapt this testcode!
        }
예제 #13
0
        public void propertyViewTest()
        {
            Diagramm target = new Diagramm(); // TODO: Passenden Wert initialisieren
            UserControl actual;
            actual = target.propertyView;

            //propertyView at the moment is returning itself to satisfy interface demands
            Assert.AreSame(target, actual, "the field should return the usercontrol reference of itself.");
        }
예제 #14
0
        public void namePluginTest()
        {
            Diagramm target = new Diagramm(); // TODO: Passenden Wert initialisieren
            string actual;
            actual = target.namePlugin;

            Assert.AreEqual<string>("PP_Diagram", actual);
        }