Skip to content

Commit 9696e9f

Browse files
committed
-Bump version
-Bump copyright -Fix up some tests
1 parent 727f695 commit 9696e9f

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed

MailChimp.Net.Tests/CampaignTest.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,17 @@ public async Task Should_Return_Campaigns()
164164
[Fact]
165165
public async Task Should_Return_One_Campaign()
166166
{
167+
var campaign = await this.MailChimpManager.Campaigns.AddAsync(new Campaign
168+
{
169+
Settings = new Setting
170+
{
171+
ReplyTo = "[email protected]",
172+
Title = "Get Rich or Die Trying To Add Campaigns",
173+
FromName = "AddCampaign",
174+
SubjectLine = "TestingAddCampaign"
175+
},
176+
Type = CampaignType.Plaintext
177+
}).ConfigureAwait(false);
167178
var campaigns = await this.MailChimpManager.Campaigns.GetAll(new CampaignRequest { Limit = 1 });
168179
Assert.True(campaigns.Count() == 1);
169180
}

MailChimp.Net.Tests/SegmentTest.cs

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,32 @@ public class SegmentTest : MailChimpTest
1313
[Fact]
1414
public async Task Should_Get_Segment()
1515
{
16-
var lists = await this.MailChimpManager.Lists.GetAllAsync().ConfigureAwait(false);
17-
var listId = lists.First().Id;
18-
19-
var segment = new Segment()
16+
try
2017
{
21-
Name = DateTime.Now.ToString(),
22-
Options = new SegmentOptions()
18+
var createList = await this.MailChimpManager.Lists.AddOrUpdateAsync(this.GetMailChimpList());
19+
var lists = await this.MailChimpManager.Lists.GetAllAsync().ConfigureAwait(false);
20+
var listId = lists.First().Id;
21+
22+
var segment = new Segment()
2323
{
24-
Match = Match.All,
25-
Conditions = new List<Condition>()
26-
}
27-
};
24+
Name = DateTime.Now.ToString(),
25+
Options = new SegmentOptions()
26+
{
27+
Match = Match.All,
28+
Conditions = new List<Condition>()
29+
}
30+
};
2831

29-
var createdSegment = await this.MailChimpManager.ListSegments.AddAsync(listId, segment).ConfigureAwait(false);
32+
var createdSegment = await this.MailChimpManager.ListSegments.AddAsync(listId, segment).ConfigureAwait(false);
3033

31-
var retrievedSegment = await this.MailChimpManager.ListSegments.GetAsync(listId, createdSegment.Id).ConfigureAwait(false);
34+
var retrievedSegment = await this.MailChimpManager.ListSegments.GetAsync(listId, createdSegment.Id).ConfigureAwait(false);
3235

33-
Assert.NotNull(retrievedSegment);
34-
Assert.True(createdSegment.Id == retrievedSegment.Id);
36+
Assert.NotNull(retrievedSegment);
37+
Assert.True(createdSegment.Id == retrievedSegment.Id);
38+
}catch(Exception ex)
39+
{
40+
throw ex;
41+
}
3542

3643
}
3744
}

MailChimp.Net/MailChimp.Net.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
3232
<AssemblyOriginatorKeyFile>MailChimp.Key.snk</AssemblyOriginatorKeyFile>
3333
<PackageId>MailChimp.Net.V3</PackageId>
34-
<Version>3.5.0</Version>
34+
<Version>4.0.0</Version>
3535
<Authors>Brandon Seydel</Authors>
3636
<Company>DevSquad</Company>
3737
<Product>MailChimp.Net.V3</Product>
3838
<Title>MailChimp.Net.V3</Title>
3939
<Description>A .NET Wrapper for Mail Chimp v3.0 API</Description>
4040
<Summary>A very fast, thin, and intuitive .NET Wrapper for the Mail Chimp v3.0 API.</Summary>
41-
<Copyright>Copyright © 2018</Copyright>
41+
<Copyright>Copyright © 2019</Copyright>
4242
<PackageProjectUrl>https://github.com/brandonseydel/MailChimp.Net</PackageProjectUrl>
4343
<RepositoryUrl>https://github.com/brandonseydel/MailChimp.Net</RepositoryUrl>
4444
<RepositoryType>Git</RepositoryType>

0 commit comments

Comments
 (0)