Skip to content

Commit

Permalink
-Bump version
Browse files Browse the repository at this point in the history
-Bump copyright
-Fix up some tests
  • Loading branch information
brandonseydel committed Mar 28, 2019
1 parent 727f695 commit 9696e9f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
11 changes: 11 additions & 0 deletions MailChimp.Net.Tests/CampaignTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ public async Task Should_Return_Campaigns()
[Fact]
public async Task Should_Return_One_Campaign()
{
var campaign = await this.MailChimpManager.Campaigns.AddAsync(new Campaign
{
Settings = new Setting
{
ReplyTo = "test@test.com",
Title = "Get Rich or Die Trying To Add Campaigns",
FromName = "AddCampaign",
SubjectLine = "TestingAddCampaign"
},
Type = CampaignType.Plaintext
}).ConfigureAwait(false);
var campaigns = await this.MailChimpManager.Campaigns.GetAll(new CampaignRequest { Limit = 1 });
Assert.True(campaigns.Count() == 1);
}
Expand Down
35 changes: 21 additions & 14 deletions MailChimp.Net.Tests/SegmentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,32 @@ public class SegmentTest : MailChimpTest
[Fact]
public async Task Should_Get_Segment()
{
var lists = await this.MailChimpManager.Lists.GetAllAsync().ConfigureAwait(false);
var listId = lists.First().Id;

var segment = new Segment()
try
{
Name = DateTime.Now.ToString(),
Options = new SegmentOptions()
var createList = await this.MailChimpManager.Lists.AddOrUpdateAsync(this.GetMailChimpList());
var lists = await this.MailChimpManager.Lists.GetAllAsync().ConfigureAwait(false);
var listId = lists.First().Id;

var segment = new Segment()
{
Match = Match.All,
Conditions = new List<Condition>()
}
};
Name = DateTime.Now.ToString(),
Options = new SegmentOptions()
{
Match = Match.All,
Conditions = new List<Condition>()
}
};

var createdSegment = await this.MailChimpManager.ListSegments.AddAsync(listId, segment).ConfigureAwait(false);
var createdSegment = await this.MailChimpManager.ListSegments.AddAsync(listId, segment).ConfigureAwait(false);

var retrievedSegment = await this.MailChimpManager.ListSegments.GetAsync(listId, createdSegment.Id).ConfigureAwait(false);
var retrievedSegment = await this.MailChimpManager.ListSegments.GetAsync(listId, createdSegment.Id).ConfigureAwait(false);

Assert.NotNull(retrievedSegment);
Assert.True(createdSegment.Id == retrievedSegment.Id);
Assert.NotNull(retrievedSegment);
Assert.True(createdSegment.Id == retrievedSegment.Id);
}catch(Exception ex)
{
throw ex;
}

}
}
Expand Down
4 changes: 2 additions & 2 deletions MailChimp.Net/MailChimp.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyOriginatorKeyFile>MailChimp.Key.snk</AssemblyOriginatorKeyFile>
<PackageId>MailChimp.Net.V3</PackageId>
<Version>3.5.0</Version>
<Version>4.0.0</Version>
<Authors>Brandon Seydel</Authors>
<Company>DevSquad</Company>
<Product>MailChimp.Net.V3</Product>
<Title>MailChimp.Net.V3</Title>
<Description>A .NET Wrapper for Mail Chimp v3.0 API</Description>
<Summary>A very fast, thin, and intuitive .NET Wrapper for the Mail Chimp v3.0 API.</Summary>
<Copyright>Copyright © 2018</Copyright>
<Copyright>Copyright © 2019</Copyright>
<PackageProjectUrl>https://github.com/brandonseydel/MailChimp.Net</PackageProjectUrl>
<RepositoryUrl>https://github.com/brandonseydel/MailChimp.Net</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
Expand Down

0 comments on commit 9696e9f

Please sign in to comment.