public Match DeclareMatch(string name, string place) { var match = new Match() { Id = Guid.NewGuid(), Name = name, Place = place, Date = DateTime.Now }; _persistentService.Saveobject(match, "match.json"); return match; }
private Match CreateMatch() { var match= new Match() { Place = "h", Date = _date, Id = _id, Name = "ha"}; return match; }
public void DeclareMatch_CheckArguments_Match() { _expectedMatch = new Match() { Place = "", Name = "", }; var actual = _target.DeclareMatch( _expectedMatch.Place, _expectedMatch.Name); Assert.AreEqual(_expectedMatch.Place, actual.Place); Assert.AreEqual(_expectedMatch.Name, actual.Name); }
public void DeclareMatch_Saveobject_Match() { _expectedMatch = new Match() { Place = "", Name = "" }; _target.DeclareMatch(_expectedMatch.Place, _expectedMatch.Name); _stubPersistentService.AssertWasCalled(x => x .Saveobject(Arg<Match>.Matches(actualMatch => CheckMatch(_expectedMatch, actualMatch)), Arg<string>.Is.Same("match.json"))); }
private bool CheckMatch(Match expectedMatch, Match actualMatch) { Assert.AreEqual(expectedMatch.Place, actualMatch.Place); Assert.AreEqual(expectedMatch.Name, actualMatch.Name); return true; }