protected override void Before() { FakeConnectionFactory cf = new FakeConnectionFactory(); request = new IconUploadRequest(cf, WebsiteState, IconValidatorService, new FakeFileReceiver(1, "Test File")); Icon existingIcon = new Icon() { Id = 5, Name = "Test Icon", Image = "png", Link = "a.com/b" }; cf.IconInternal.Init(existingIcon); Icon icon = new Icon() { Name = "Test Icon", Image = "png", Link = "a.com" }; post = new IconPost() { Id = -1, Name = "Test Icon", Link = "a.com" }; }
protected override void Before() { FakeConnectionFactory cf = new FakeConnectionFactory(); IconUploadRequest request = new IconUploadRequest(cf, WebsiteState, IconValidatorService, new FakeEmptyFileReceiver()); cf.IconInternal.Init(new Icon() { Id = EXISTING_ID, Name = EXISTING_NAME, Image = EXISTING_IMAGE, Link = EXISTING_LINK }); IconPost post = new IconPost() { Id = EXISTING_ID, Name = EXISTING_NAME, Link = NEW_LINK }; request.Process(post); newIcon = cf.IconInternal.Records.Single(); history = cf.IconHistoryInternal.Records.Single(); }
protected override void Before() { FakeConnectionFactory cf = new FakeConnectionFactory(); request = new IconUploadRequest(cf, WebsiteState, IconValidatorService, new FakeEmptyFileReceiver()); post = new IconPost() { Id = -1, Name = "test icon", Link = "a.com/b" }; }
protected override void Before() { FakeConnectionFactory cf = new FakeConnectionFactory(); fileReceiver = new FakeFileReceiver(1, "Test File"); IconUploadRequest request = new IconUploadRequest(cf, WebsiteState, IconValidatorService, fileReceiver); IconPost post = new IconPost() { Id = -1, Name = "test icon", Link = LINK }; request.Process(post); newIcon = cf.IconInternal.Records.Single(); history = cf.IconHistoryInternal.Records.Single(); }
protected override void Before() { request = new IconUploadRequest(new FakeConnectionFactory(), WebsiteState, IconValidatorService, new FakeEmptyFileReceiver()); }