public void Repo_Logins_GetV1_Success() { var data = new TestDataFactory(UoW); data.Destroy(); data.CreateLogins(); var results = UoW.Logins.Get(); results.Should().BeAssignableTo <IEnumerable <uvw_Login> >(); results.Count().Should().Be(UoW.Logins.Count()); }
public void Repo_Logins_DeleteV1_Success() { var data = new TestDataFactory(UoW); data.Destroy(); data.CreateLogins(); var login = UoW.Logins.Get(QueryExpressionFactory.GetQueryExpression <uvw_Login>() .Where(x => x.Name == TestDefaultConstants.LoginName).ToLambda()) .Single(); UoW.Logins.Delete(login); UoW.Commit(); }
public void Repo_Logins_UpdateV1_Success() { var data = new TestDataFactory(UoW); data.Destroy(); data.CreateLogins(); var login = UoW.Logins.Get(QueryExpressionFactory.GetQueryExpression <uvw_Login>() .Where(x => x.Name == TestDefaultConstants.LoginName).ToLambda()) .Single(); login.Name += "(Updated)"; var result = UoW.Logins.Update(login); UoW.Commit(); result.Should().BeAssignableTo <uvw_Login>(); }
public void Repo_Logins_CreateV1_Success() { var data = new TestDataFactory(UoW); data.Destroy(); data.CreateLogins(); var result = UoW.Logins.Create( Mapper.Map <uvw_Login>(new LoginV1() { Name = TestDefaultConstants.LoginName, LoginKey = TestDefaultConstants.LoginKey, IsDeletable = false, })); UoW.Commit(); result.Should().BeAssignableTo <uvw_Login>(); }