Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions KV_UserExistsTest
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using NUnit.Framework;
using TestProject2.BL;
using TestProject2.Mock;

namespace TestProject2
{
[TestFixture]
public class TestUserExists
{
[Test]
public void UserExistsTest()
{
var userInfo = new MockUserRepository().GetUserInfo(6);

Assert.NotNull(userInfo);
}

[Test]
public void UserNotExistsThrowsException()
{
var userRepository = new UserRepository();

Assert.Throws<NullReferenceException>(() => userRepository.GetUserInfo(7));
}
}
}