Adds LightBDD
This commit is contained in:
parent
099f6467d2
commit
104187fcac
16 changed files with 344 additions and 158 deletions
|
|
@ -1,5 +1,5 @@
|
|||
using FluentAssertions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Shouldly;
|
||||
using PlanTempus.Tests;
|
||||
using PlanTempus.Core.Configurations;
|
||||
using PlanTempus.Core.Configurations.JsonConfigProvider;
|
||||
|
|
@ -33,8 +33,8 @@ namespace PlanTempus.Tests.ConfigurationTests
|
|||
var section = builder.GetSection("Feature");
|
||||
|
||||
// Assert
|
||||
section.Should().NotBeNull();
|
||||
section.Value.Should().BeEquivalentTo(expectedJObject);
|
||||
section.ShouldNotBeNull();
|
||||
section.Value.ShouldBeEquivalentTo(expectedJObject);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
|
@ -58,8 +58,8 @@ namespace PlanTempus.Tests.ConfigurationTests
|
|||
var actualFeatureObsoleted = builder.GetSection("Feature").Get<Feature>();
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
// Assert
|
||||
actualFeature.Should().BeEquivalentTo(expectedFeature);
|
||||
actualFeatureObsoleted.Should().BeEquivalentTo(expectedFeature);
|
||||
actualFeature.ShouldBeEquivalentTo(expectedFeature);
|
||||
actualFeatureObsoleted.ShouldBeEquivalentTo(expectedFeature);
|
||||
|
||||
}
|
||||
[TestMethod]
|
||||
|
|
@ -76,7 +76,7 @@ namespace PlanTempus.Tests.ConfigurationTests
|
|||
var actualFeature = builder.GetSection("AnotherSetting").Get<string>("Thresholds:High");
|
||||
|
||||
// Assert
|
||||
actualFeature.Should().BeEquivalentTo(expectedFeature);
|
||||
actualFeature.ShouldBeEquivalentTo(expectedFeature);
|
||||
}
|
||||
/// <summary>
|
||||
/// Testing a stupid indexer for compability with Microsoft ConfigurationBuilder
|
||||
|
|
@ -95,7 +95,7 @@ namespace PlanTempus.Tests.ConfigurationTests
|
|||
var actual = builder["Authentication"];
|
||||
|
||||
// Assert
|
||||
actual.Should().BeEquivalentTo(expected);
|
||||
actual.ShouldBeEquivalentTo(expected);
|
||||
}
|
||||
[TestMethod]
|
||||
public void Get_ShouldReturnCorrectValueAsInt()
|
||||
|
|
@ -111,7 +111,7 @@ namespace PlanTempus.Tests.ConfigurationTests
|
|||
var actualFeature = builder.GetSection("AnotherSetting:Temperature").Get<int>("Indoor:Max:Limit");
|
||||
|
||||
// Assert
|
||||
actualFeature.Should().Be(expectedFeature);
|
||||
actualFeature.ShouldBe(expectedFeature);
|
||||
}
|
||||
[TestMethod]
|
||||
public void Get_ShouldReturnCorrectValueAsBool()
|
||||
|
|
@ -128,7 +128,7 @@ namespace PlanTempus.Tests.ConfigurationTests
|
|||
var actualFeature = configRoot.Get<bool>("Database:UseSSL");
|
||||
|
||||
// Assert
|
||||
actualFeature.Should().Be(expectedFeature);
|
||||
actualFeature.ShouldBe(expectedFeature);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue