Example #1
0
        public virtual void TestNodesBlockRenderForNodeLabelFilterWithNonEmptyLabel()
        {
            NodesPage.NodesBlock nodesBlock = injector.GetInstance <NodesPage.NodesBlock>();
            nodesBlock.Set("node.label", "x");
            nodesBlock.Render();
            PrintWriter writer = injector.GetInstance <PrintWriter>();

            WebAppTests.FlushOutput(injector);
            Org.Mockito.Mockito.Verify(writer, Org.Mockito.Mockito.Times(numberOfRacks * numberOfActualTableHeaders
                                                                         + numberOfThInMetricsTable)).Write("<td");
        }
Example #2
0
        public virtual void TestNodesBlockRenderForLostNodes()
        {
            NodesPage.NodesBlock nodesBlock = injector.GetInstance <NodesPage.NodesBlock>();
            nodesBlock.Set("node.state", "lost");
            nodesBlock.Render();
            PrintWriter writer = injector.GetInstance <PrintWriter>();

            WebAppTests.FlushOutput(injector);
            Org.Mockito.Mockito.Verify(writer, Org.Mockito.Mockito.Times(numberOfActualTableHeaders
                                                                         + numberOfThInMetricsTable)).Write("<th");
            Org.Mockito.Mockito.Verify(writer, Org.Mockito.Mockito.Times(numberOfRacks * numberOfLostNodesPerRack
                                                                         * numberOfActualTableHeaders + numberOfThInMetricsTable)).Write("<td");
        }