public void GetReturnById() { var mockContext = this.GetMockContext(); var service = new PersonService(mockContext.Object); var actual = service.Get(1); actual.Name.ShouldBe("Willis Tibbs"); actual.IsEnabled.ShouldBeTrue(); actual.IsAuthorised.ShouldBeTrue(); actual.Colours.Count.ShouldBe(3); }
public void GetAllBriefReturnsACollection() { var mockContext = this.GetMockContext(); var service = new PersonService(mockContext.Object); var actual = service.GetAllBrief().ToList(); actual.Count().ShouldBe(3); actual.First().Name.ShouldBe("Willis Tibbs"); actual.First().IsEnabled.ShouldBeTrue(); actual.First().IsAuthorised.ShouldBeTrue(); actual.First().Colours.ShouldBe("Red, Green, Blue"); }