Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AnalyticsServicesShould
- {
- [Fact]
- public void ReturnSessionCount()
- {
- var service = new AnalyticsServices();
- var sut = service.GetCountAndSave();
- if(DateTime.Today.DayOfWeek == DayOfWeek.Friday){
- Assert.True(sut > 0);
- }else{
- Assert.True(sut == 0);
- }
- }
- }
- public class AnalyticsService{
- public int GetCountAndSave(){
- var sessions = GoogleService.GetSessions();
- var saveCount = 0;
- if (DateTime.Today.DayOfWeek == DayOfWeek.Friday)
- {
- saveCount = AddToData(sessions);
- }
- else
- {
- Console.WriteLine("Not Today!");
- }
- return saveCount;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement