public void SetLocationPropertyCorrectly() { //Arrange var packagesMock = Mock.Create <IRepository <IPackage> >(); var sut = new ProjectFake("name", "location", packagesMock); //Act var result = sut.Location; //Assert Assert.AreEqual("location", result); }
public async Task Should_get_project_by_id() { var project = ProjectFake.Default(Guid.NewGuid()); PersistEntities(project); var found = await _projectService.GetById(project.Id); var projectFound = found.Data as Project; var projectDb = _context.Set <Project>().First(); found.Should().NotBeNull(); projectDb.Name.Should().BeEquivalentTo(projectFound.Name); }