public ProfileControllerTests(ProfileFixture fixture) { _controller = fixture.Scope.ServiceProvider.GetService <ProfileController>(); _dao = fixture.Scope.ServiceProvider.GetService <IProfileDao>(); _attribute = fixture.Attribute; _profile = fixture.Profile; }
public Task CreateProfile(YobaProfile p, CancellationToken cancel = default) { using var db = _factory.Create(); return(db.Profiles.InsertAsync(() => new Profile { Id = p.Id, Loisy = p.Loisy, Slivi = p.Slivi, Zashkvory = p.Zashkvory, CanVote = p.CanVote, MainName = p.MainName, IsTransport = false, }, cancel)); }
public ProfileDaoTests(ProfileFixture fixture) { _dao = fixture.Scope.ServiceProvider.GetService <IProfileDao>(); _attribute = fixture.Attribute; _profile = fixture.Profile; }
static double karma(YobaProfile p) { var k = Math.Sqrt(Math.Pow(p.Loisy, 2) + Math.Pow(p.Zashkvory, 2)) / 100500.0; return(k * (p.Loisy - Math.Sqrt(0.93 * Math.Pow(p.Zashkvory, 2)))); }