refactoring
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
namespace Yavsc.Models.Google
|
||||
namespace Yavsc.Abstract.Identity
|
||||
{
|
||||
/// <summary>
|
||||
/// Auth token, as they are received.
|
9
Yavsc.Abstract/Identity/Me.cs
Normal file
9
Yavsc.Abstract/Identity/Me.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Yavsc.Abstract.Identity {
|
||||
public class Me : UserInfo
|
||||
{
|
||||
public AuthToken Token {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Abstract.Identity;
|
||||
using Yavsc.Models.Google;
|
||||
|
||||
namespace Yavsc.GoogleApis
|
||||
|
@ -142,7 +142,7 @@ namespace Yavsc.WebApi.Controllers
|
||||
.Include(u=>u.Roles)
|
||||
.FirstAsync(u=>u.Id == uid);
|
||||
|
||||
var user = new Me(userData.Id, userData.UserName, userData.Email,
|
||||
var user = new Yavsc.Models.Auth.Me(userData.Id, userData.UserName, userData.Email,
|
||||
userData.Avatar ,
|
||||
userData.PostalAddress, userData.DedicatedGoogleCalendar );
|
||||
|
||||
|
@ -14,6 +14,7 @@ using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.OptionsModel;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
using Yavsc;
|
||||
using Yavsc.Lib;
|
||||
using Yavsc.Models;
|
||||
@ -24,21 +25,25 @@ namespace test
|
||||
public class YavscWorkInProgress : BaseTestContext
|
||||
{
|
||||
|
||||
ServerSideFixture _serverFixture;
|
||||
ITestOutputHelper output;
|
||||
public YavscWorkInProgress(ServerSideFixture serverFixture, ITestOutputHelper output)
|
||||
{
|
||||
this.output = output;
|
||||
_serverFixture = serverFixture;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GitClone()
|
||||
{
|
||||
|
||||
AppDomain.CurrentDomain.SetData("YAVSC_DB_CONNECTION", "Server=localhost;Port=5432;Database=YavscDev;Username=yavscdev;Password=admin;");
|
||||
ServiceCollection services = new ServiceCollection();
|
||||
var dbc = _serverFixture._app.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext;
|
||||
|
||||
YavscMandatory.ConfigureServices(services, testprojectAssetPath, out configuration, out provider);
|
||||
|
||||
var siteConfig = provider.GetRequiredService<IOptions<SiteSettings>>().Value;
|
||||
var dbc = provider.GetRequiredService<ApplicationDbContext>();
|
||||
|
||||
var firstProject = dbc.Projects.FirstOrDefault();
|
||||
Assert.NotNull (firstProject);
|
||||
|
||||
var clone = new GitClone(siteConfig.GitRepository);
|
||||
var clone = new GitClone(_serverFixture._siteSetup.GitRepository);
|
||||
clone.Launch(firstProject);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user