Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Commit 45178f9

Browse files
authored
Merge pull request #58 from Standaard-boos/SearchingTesting
Searching testing
2 parents f16ac1c + d50fc84 commit 45178f9

File tree

4 files changed

+53
-3
lines changed

4 files changed

+53
-3
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using NUnit.Framework;
5+
6+
namespace Gateway.Test
7+
{
8+
class Gateway_SearchProfileDataAccess
9+
{
10+
[Test]
11+
public void GetListBasedOnRelation_GetNotNull_ThrowExeption()
12+
{
13+
Assert.NotNull(SearchProfileDataAccess.GetProfileBasedOnRelationType(3));
14+
}
15+
16+
[Test]
17+
public void GetListBasedOnIntrest_GetNotNull_ThrowExeption()
18+
{
19+
Assert.NotNull(SearchProfileDataAccess.GetProfileBasedOnIntrest(3));
20+
}
21+
}
22+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using Model;
5+
using NuGet.Frameworks;
6+
using NUnit.Framework;
7+
8+
namespace Gateway.Test
9+
{
10+
class Gateway_searchPreferenceDataAccess
11+
{
12+
[Test]
13+
public void GetPreferenceData_ObjSame_ThrowExeption()
14+
{
15+
var result = SearchPreferenceDataAccess.GetRelationType(3);
16+
Assert.IsInstanceOf<RelationType>(result);
17+
}
18+
19+
[Test]
20+
public void GetPreferenceData_ObjNotNull_ThrowExeption()
21+
{
22+
23+
var result = SearchPreferenceDataAccess.GetRelationType(3);
24+
25+
Assert.NotNull(result);
26+
}
27+
}
28+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Gateway
1010
{
11-
public static class SearchPreferenceAccesData
11+
public static class SearchPreferenceDataAccess
1212
{
1313

1414
public static RelationType GetRelationType(int id)

ViewModel/SearchPreferencePageViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public RelationType RelationType
7878

7979
public RelayCommand SaveCommand => new RelayCommand(parameter =>
8080
{
81-
SearchPreferenceAccesData.SaveRelationPreference(RelationType,(int)Account.UserID);
81+
SearchPreferenceDataAccess.SaveRelationPreference(RelationType,(int)Account.UserID);
8282
}, ()=>true);
8383

8484

@@ -87,7 +87,7 @@ public RelationType RelationType
8787

8888
public SearchPreferencePageViewModel()
8989
{
90-
RelationType = SearchPreferenceAccesData.GetRelationType((int)Account.UserID);
90+
RelationType = SearchPreferenceDataAccess.GetRelationType((int)Account.UserID);
9191
}
9292

9393

0 commit comments

Comments
 (0)