AnalyzerUnitTest.FanMotifDetectorTest.VerifyFanMotif C# (CSharp) Method

VerifyFanMotif() protected method

protected VerifyFanMotif ( ICollection oMotifs, IVertex oExpectedHeadVertex, Double dExpectedArcScale ) : void
oMotifs ICollection
oExpectedHeadVertex IVertex
dExpectedArcScale Double
return void
        protected void VerifyFanMotif
            (ICollection<Motif> oMotifs,IVertex oExpectedHeadVertex,Double dExpectedArcScale,params IVertex[] aoExpectedLeafVertices)
        {
            FanMotif oFanMotif = (FanMotif)oMotifs.Single(oMotif =>
                oMotif is FanMotif
                &&
                (((FanMotif)oMotif).HeadVertex == oExpectedHeadVertex));

            Assert.AreEqual(oExpectedHeadVertex, oFanMotif.HeadVertex);

            Assert.AreEqual(aoExpectedLeafVertices.Length,
                oFanMotif.LeafVertices.Length);

            Assert.AreEqual(dExpectedArcScale, oFanMotif.ArcScale);

            foreach (IVertex oExpectedLeafVertex in aoExpectedLeafVertices)
            {
                IVertex oLeafVertex = oFanMotif.LeafVertices.Single(
                    oVertex => (oVertex == oExpectedLeafVertex));
            }
        }