1

I am new to c# testing and wondering if this test is working properly based on my test file. If any adjustments needs to be made, feel free to adjust my test file to answer. Thanks

Here is the test file

 [TestMethod()]
  public void GetAPI_FIRM_LINKTest1()
    {
      //Arrange
      API_FIRM_LINKController controller = new API_FIRM_LINKController();
      //ACT
      controller.GetAPI_FIRM_LINK();
      var result = controller.GetAPI_FIRM_LINK();
      //Assert
      Assert.IsNotNull(result);
        Console.Write(result);

Here is part of the file that I am trying to test it

   // GET: odata

 [EnableQuery]
 public SingleResult<API_FIRM_LINK> GetAPI_FIRM_LINK([FromODataUri] Guid key)
    {
 return SingleResult.Create(db.API_FIRM_LINK.Where(aPI_FIRM_LINK => aPI_FIRM_LINK.ApiFirmLinkId == key));
    }
  • Does the test pass? – devNull Mar 12 at 1:18
  • It is passing at the moment – user 9191 Mar 12 at 1:19
  • @devNull not calling ODATA I think – user 9191 Mar 12 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.