Skip to content

Instantly share code, notes, and snippets.

@cosminpopescu14
Created November 25, 2019 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosminpopescu14/6a5d71d362c2d4f81abbd589ef038c0e to your computer and use it in GitHub Desktop.
Save cosminpopescu14/6a5d71d362c2d4f81abbd589ef038c0e to your computer and use it in GitHub Desktop.
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