public void TestInitialize() { _iLogger = new FileLogger(); _iClient = new WebClient(); _iPostDAL = new PostDAL(_iLogger, _iClient); _stubIClient = new StubIClient(); }
public User(IUserDAL user, IPostDAL post, ICommentDAL comment, ILikeDAL like, IUserDALNeo4j userDALNeo4J, IStreamDALCassandra stream, IStreamDataCassandra streamData) { _user = user; _post = post; _comment = comment; _like = like; _userNeo4j = userDALNeo4J; _streamData = streamData; _stream = stream; }
public void TestTearDown() { if (_iPostDAL != null) { _iPostDAL = null; } if (_iClient != null) { _iClient = null; } }
public void QueryAllPostsOnGetStringException() { _iPostDAL = new PostDAL(_iLogger, _stubIClient); _stubIClient.GetResponseHttpClientString = (arg1, arg2) => { throw new Exception(); }; _iPostDAL.QueryDetail <Post>(Helper.GetURL(new RequestObject() { URL = "" })); }
public void QueryAllPostsOnGetStringIsNull() { try { _iPostDAL = new PostDAL(_iLogger, _stubIClient); _stubIClient.GetResponseHttpClientString = (arg1, arg2) => { return("..."); }; _iPostDAL.QueryDetail <Post>(Helper.GetURL(new RequestObject() { URL = "" })); } catch (Exception ex) { Assert.IsTrue(ex.Message == "Input string '...' is not a valid number. Path '', line 1, position 3."); } }
public PostBLL() : base(_Type) { this._Dal = base.CurrentDAL as IPostDAL; }
public PostBLL(IPostDAL post, IMapper mapper) { _post = post; _mapper = mapper; }
/// <summary> /// Initializes a new instance of the <see cref="MainViewModel"/> class. /// </summary> /// <param name="iPostDAL">The i post dal.</param> /// <param name="iLogger">The i logger.</param> public MainViewModel(IPostDAL iPostDAL, ILogger iLogger) { _postDAL = iPostDAL; _iLogger = iLogger; }