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

            //no Exception should occur
        }
Exemple #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.");
        }
Exemple #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.");
        }
Exemple #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!");
        }
Exemple #5
0
        public void typeTest()
        {
            Diagramm target = new Diagramm(); // TODO: Passenden Wert initialisieren
            PluginType actual;
            actual = target.type;

            Assert.AreEqual<PluginType>(PluginType.IPresentation, actual);
        }
Exemple #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
        }
Exemple #7
0
        public void threadSafeTest()
        {
            Diagramm target = new Diagramm();
            bool expected = false;
            bool actual;
            actual = target.threadSafe;

            Assert.AreEqual<bool>(expected, actual);
        }
Exemple #8
0
 public void setVideoTest_null()
 {
     Diagramm target = new Diagramm();
     IVideo video = null;
     target.setVideo(video);
 }
Exemple #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
        }
Exemple #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
        }
Exemple #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
        }
Exemple #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!
        }
Exemple #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.");
        }
Exemple #14
0
        public void namePluginTest()
        {
            Diagramm target = new Diagramm(); // TODO: Passenden Wert initialisieren
            string actual;
            actual = target.namePlugin;

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