[pluralsight] 플러랄사이트 C#강의 5
IT/Programming2020. 10. 5. 12:12
Testing Your Code
Unit Testing: Verify the code
(Testing edge conditions. ; user input wrong value )
xUnit.net : Unit. Test library
dotnet new xunit // create test project
dotnet add package xunit // NuGet package website search and add here in cmd
// PackageReference you can check from .csproj file
Template for the unit test.
using System;
using Xunit; //xunit namespaces
namespace GradeBook.Tests
{
public class UnitTest1
{
[Fact] //attirubute
public void Test1()
{
}
}
}
test command in the vs code => built in test runner.
dotnet test //excute test
강의대로하면 뭔가 안맞는데
1. 강의에서 처럼 Book.cs 에 pubulic class가 안됨
2. dotnet.test하면 밑에처럼 알록달록하게 뜸.
일단은 넘어가고 나중에 다시와서 해보는수밖에 없는것같다.
반응형
'IT > Programming' 카테고리의 다른 글
[git] xcrun: error: invalid active developer path (0) | 2020.11.28 |
---|---|
VirtualBox 에서 Ubuntu 해상도 조절 (0) | 2020.11.26 |
[pluralsight] 플러랄사이트 C#강의 1&2&3&4 (0) | 2020.09.22 |
[pulralsight] 플러랄 사이트 C# 강의 (0) | 2020.09.21 |
[Programming ] 공부 (0) | 2020.06.05 |
댓글()