[Test] public void TestApplicationComplexity() { var appComplexity = TestUtility.AddApplicationComplexity("MyApp", "MyNamespace"); Assert.Greater(appComplexity, 1000); }
[Fact] public void TestApplicationComplexity_DifferentNamespace() { var appComplexity = TestUtility.AddApplicationComplexity("MyApp", "MyOtherNamespace"); Assert.NotEqual(appComplexity, 0); }This code example uses Xunit syntax to test the complexity of a different namespace in the same application. It calls AddApplicationComplexity again, this time with a different namespace value. It then asserts that the result is not equal to zero. This test can help find areas of the application that may be more complex than others. In both examples, the TestUtility package library is used to call the AddApplicationComplexity method.