Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I see many people talking about the term SUT, but do not understand why they use that term.

SUT is what you want to test?

Where does this term come from and what does it mean?

For example in this test, what is my SUT?

[TestMethod]
public void UsersAction_should_return_IndexAction()
{
    const long id = 1;

    UsersViewModel viewModel = new UsersViewModel()
    {
        SelectedUsers = new long[] { 1, 2, 3, 4 }
    };

    ActionResult result = _controller.Users(id, viewModel);

    result.AssertActionRedirect().ToAction("Index");
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
344 views
Welcome To Ask or Share your Answers For Others

1 Answer

The System Under Test (SUT) from a Unit Testing perspective represents all of the actors (i.e one or more classes) in a test that are not mocks or stubs. In your example that would be the controller.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...