Ad
  • Custom User Avatar

    Please note that in the description, the "main" category that we have to filter by is not the string "MainCategory" but the most common category present in that particular test case. If my categories are ["Red", "Red", "Green", "Blue"] then the "main category" is "Red".

    To your last sentence: you can print the test inputs to see what's going on.

    Your issue with the order of the assertion arguments is correct.

  • Default User Avatar

    The Tests of C# have some mistakes.
    First, the question description said "{Category = "Main Category", Name = "Camera 1"}", but in the example test, the Category it set is "MainCategory", it lost the space.
    Second, the "Assert.AreEqual(checker.Count, 5);" statement is wrong. You should write down "Assert.AreEqual(5, checker.Count);".
    And I don't know why my code can pass the example test but only get zero elements in the other tests. I don't know if there are other errors in the tests that I can't see.

  • Custom User Avatar

    Wow, I have never used System.Reflection.DynamicMethod before. Thank the author.