forked from pfh59/eve-whmapper
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Multi Map Management #9 - remove usued using - reindent - add new service EveMapperRealTimeService - and new componentmap - update to donet 8.0.8 - fix migration : add alter table - fix WHNote for multimap - fix routeplanner for multimap - Delete old add system force - Use New Search System dialogue - add authorization policy for map and control map loading - fix and add testunit - Add tooltip for route planner button - Update realtime service to manage multi map and access events - Fix user connected and disconnected by map - Fix copy /paste sig and notes
- Loading branch information
Showing
141 changed files
with
7,054 additions
and
2,770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
using System.Collections.Generic; | ||
using WHMapper.Models.Db; | ||
using WHMapper.Models.DTO.MapAdmin; | ||
using Xunit; | ||
|
||
|
||
namespace WHMapper.Tests.Models; | ||
|
||
|
||
public class MapAdminTests | ||
{ | ||
[Fact] | ||
public void Constructor_ShouldInitializeProperties() | ||
{ | ||
// Arrange | ||
var whMap = new WHMap("Test Map"); | ||
whMap.Id = 1; | ||
whMap.WHAccesses.Add(new WHAccess(1,"Test Access")); | ||
|
||
// Act | ||
var mapAdmin = new MapAdmin(whMap); | ||
|
||
// Assert | ||
Assert.Equal(1, mapAdmin.Id); | ||
Assert.Equal("Test Map", mapAdmin.Name); | ||
Assert.NotNull(mapAdmin.WHMapAccesses); | ||
Assert.Single(mapAdmin.WHMapAccesses); | ||
Assert.False(mapAdmin.ShowAccessDetails); | ||
} | ||
|
||
[Fact] | ||
public void Constructor_ShouldHandleNullWHMap() | ||
{ | ||
// Act | ||
var mapAdmin = new MapAdmin(null); | ||
|
||
// Assert | ||
Assert.Equal(-1, mapAdmin.Id); | ||
Assert.Equal(string.Empty, mapAdmin.Name); | ||
Assert.Null(mapAdmin.WHMapAccesses); | ||
Assert.False(mapAdmin.ShowAccessDetails); | ||
} | ||
|
||
[Fact] | ||
public void ShowAccessDetails_ShouldBeFalseByDefault() | ||
{ | ||
// Arrange | ||
var whMap = new WHMap("Test Map"); | ||
|
||
// Act | ||
var mapAdmin = new MapAdmin(whMap); | ||
|
||
// Assert | ||
Assert.False(mapAdmin.ShowAccessDetails); | ||
} | ||
|
||
[Fact] | ||
public void ShowAccessDetails_ShouldBeSettable() | ||
{ | ||
// Arrange | ||
var whMap = new WHMap("Test Map"); | ||
var mapAdmin = new MapAdmin(whMap); | ||
|
||
// Act | ||
mapAdmin.ShowAccessDetails = true; | ||
|
||
// Assert | ||
Assert.True(mapAdmin.ShowAccessDetails); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.