コード例 #1
0
    public void TestMethod1()
    {
        IConfiguration mock         = new MockConfiguration();
        var            simpleObject = mock.GetValid <SimpleObject>();

        Assert.AreEqual(simpleObject.MyConfigStr, "123");
    }
コード例 #2
0
    public static void Main()
    {
        //Arrange
        IConfiguration mock = new MockConfiguration();
        //Act
        var obj = mock.GetValid <SimpleObject>();

        //Assert;
        Console.WriteLine(obj.GetType().IsAssignableFrom(typeof(SimpleObject)));
        Console.ReadLine();
    }