Finished Referencing Projects and Packages

test_your_code
Jason Zhu 2021-02-17 02:30:04 +00:00
parent c36b3f5caf
commit 41bf0f3824
4 changed files with 27 additions and 15 deletions

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace GradeBook namespace GradeBook
{ {
class Book public class Book
{ {
private List<double> grades; private List<double> grades;
private string name; private string name;

View File

@ -0,0 +1,22 @@
using System;
using Xunit;
using GradeBook;
namespace GradeBook.Tests
{
public class BookTests
{
[Fact]
public void Test1()
{
// arrange
var book = new Book("");
book.AddGrade(89.1);
book.AddGrade(90.5);
book.AddGrade(77.3);
// act
book.ShowStaticstics();
}
}
}

View File

@ -19,4 +19,8 @@
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\GradeBook\GradeBook.csproj" />
</ItemGroup>
</Project> </Project>

View File

@ -1,14 +0,0 @@
using System;
using Xunit;
namespace GradeBook.Tests
{
public class UnitTest1
{
[Fact]
public void Test1()
{
Assert.Equal(1,0);
}
}
}