Created
November 25, 2019 18:10
-
-
Save cosminpopescu14/6a5d71d362c2d4f81abbd589ef038c0e to your computer and use it in GitHub Desktop.
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
using Xunit; | |
using System.Linq; | |
using System.Collections.Generic; | |
using FluentAssertions; | |
namespace Anabi.InstitutionsImporter.Tests | |
{ | |
public class InstitutionImporterTest | |
{ | |
[Fact] | |
public void ListOfInstitutionsShouldBeNotEmpty() | |
{ | |
var result = InstitutionImporter.Deserialize(); ; | |
Assert.True(result.Count > 0); | |
} | |
[Fact] | |
public void ShouldFind_A_Court() | |
{ | |
var result = InstitutionImporter.Deserialize(); ; | |
var expected = new List<Institution> | |
{ | |
new Institution(){ Id = 107, Name = "Tribunalul ALBA" } | |
}; | |
var actual = result.Where(i => i.Id == 107); | |
actual.FirstOrDefault() | |
.Should() | |
.BeEquivalentTo(expected.FirstOrDefault()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment